Search

Thanks Nick.

The line immediately below the problem line is this

$sm = new SectionManager($this->_Parent);

And with that in mind I tried passing $this->_Parent into the contentBlueprintsDatasource constructor and it then seemed to work fine. I thought I ought to bring it to your attention in case there is a deeper issue.

That’ll work too — the Parent recurses back up to the Administration object (which is an instance of Symphony). I’ll merge this into Section Schemas this evening, cheers.

Doesn’t work in 2.0.6. After attaching newly created DS to page it won’t show anything, also ?debug shows blank page

I also noticed that after creating DS for another section the first one is overwrited. I’m trying to do a page with 2 blogs and 2 tag clouds.

Ok, i’ve found error. I use non-standard text-formatter (WYMEditor), when I changed it to Markdown works now. Another method that works for me is to comment out line 81 in extension.driver.php:

$section_field->displayPublishPanel($html);

I’ve also readed README file and now I know how to create DS for more than one section. Anyway, thank you Nick for that extension :)

My second method but XML source doesn’t contain tag list. My client wants WYSIWYG editor. I’ve changed to TinyMCE, and it doesn’t work too! Is there are any method to get Taglist values with number of occurences? I tried to do it with xslt, but no luck yet.

Debugging in progress: No WYSIWYG editor will work because (i think) they changes html tree by adding javascripts to head.

Now it almost works. I’ve added ‘textarea’ to $incompatible_publishpanel array. WYSIWYG editor works, Tag list is showing, but… count attribute in xml is empty… Still need to find other method to get tag list count. Tomorrow I need to end project with tag cloud, but don’t know how…

Sorry for spam, but I’ve found working tag cloud DS in this topic. Again it’s yours. Thank you Nick!

As you know, Nick, I’m in the process of building templates that automatically recreate Symphony admin pages with XML and XSLT. I am using Section Schemas to provide the XML used to build the pages. For the entries lists, there was one attribute that I will need to determine which columns to display that is currently currently missing from the XML: show_columns. I modified the following on lines 60-62 of the extension.driver.php file:

if (in_array($key, array('id', 'type', 'required', 'label', 'location', 'sortorder'))) {
    $f->setattribute($key, $value);
}

I found I was able to easily add the attribute by adding it to the array. To be consistent with the way handles are formatted in the XML, I translated the underscore to a hyphen. Would this be the proper way to “handle” this?

if (in_array($key, array('id', 'type', 'required', 'label', 'location', 'show_column', 'sortorder'))) {
    $f->setattribute(strtr($key, '_', '-'), $value);
}

With this change, I was able to resave my Section Schemas data sources and the attribute was added to the XML.

Sounds good to me! You could try using General::createHandle(...) to see if that converts the underscores to hyphens, which would be more Symphony-like. Send me a pull request along with anything else you realise you may need and I’ll make a new clean release.

Maybe I should have looked down a few lines to see this (line 71):

$f->appendChild(new XMLElement(Lang::createHandle($key), $value));

So, what if I do this instead:

$f->setattribute(Lang::createHandle($key), $value);

Does the Lang class have to do with localization?

Does the Lang class have to do with localization?

Nope, it’s just there the createHandle function lives. It makes sense for it to live under the Lang “namespace” rather than General since handle creation takes into account language-specific letters/characters.

I couldn’t get Github to pull your change in, so I just added this myself. Thanks!

http://github.com/nickdunn/section_schemas/commit/77954be763ad5ef8d804158465bebb5557f15ccf

Nick, may only be a small bug, in 2.0.8RC3 when I deselect all Section Schemas, there is the following error…

in_array() expects parameter 2 to be array, null given
/Users/designermonkey/Sites/designermonkey/extensions/section_schemas/content/content.list.php line 85

80              
81                  $file = DATASOURCES . '/data.section_schema_' . str_replace('-', '_', $section->_data['handle']) . '.php';
82                  
83                  General::deleteFile($file);
84                  
85                  if (in_array($section->_data['handle'], $sections_post)) {
86                      
87                      $dsShell = file_get_contents(TEMPLATE . '/datasource.tpl');
88                      
89                      $dsShell = str_replace("require_once(TOOLKIT . '/class.datasource.php');", "require_once(TOOLKIT . '/class.datasource.php');

Minor thing discovered: The extension adds it navigation item under ‘Blueprints’, but does not take into account that the navigation group name might be localized. Suggest changing line 23 in extension.driver.php to:

'location'  => __('Blueprints'),

I can’t get this to work, I want to create a tagcloud out of a tag list. So i installed this extension, created the datasource and attached it to the page, when i load the page i get the following warning:

`DOMDocument::loadXML() [domdocument.loadxml]: StartTag: invalid element name in Entity, line: 23 /mnt/web8/33/02/51605502/htdocs/xpresszo-ensemble/extensions/section_schemas/extension.driver.php line 84

79                  // grab the HTML used in the Publish entry form
80                  $html = new XMLElement('html');
81                  $section_field->displayPublishPanel($html);
82
83                  $dom = new DomDocument();
84                  $dom->loadXML($html->generate());
85
86                  $xpath = new DomXPath($dom);
87
88                  $options = new XMLElement('options');`

Try adding an @ at the beginning of line 84 to suppress errors. I guess you have an & in one of the tag names. That makes the XML invalid.

84                  @$dom->loadXML($html->generate());

Thanks, that worked! I think the Markdown (with HTML purifier) text formatter was causing the error. Set text formatter to none and now it’s working.

Section Schemas updated to version 1.5 on 1st of November 2010

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details