Search

As a visual introduction, I just added a few screenshots to the initial post of this thread.

Yes, that fixed it. Thanks for the prompt attention. Like I said, this is exactly what I need.

Well done Nils for this amazing extension. If I originally git clone‘d the development branch, is there something I should do to switch over to the release branch?

The release branch does not contain submodules: Stage and Draggable are included directly in this branch. So you have to force the checkout:

$ git checkout -f release

That seems to have worked, except I was warned this: warning: unable to rmdir lib/draggable: Directory not empty warning: unable to rmdir lib/stage: Directory not empty

Should I delete them myself, or should they stay there?

No, if you delete them, Subsection Manager will stop working. It should be fine the way it is now.

Ok that’s what I thought, thanks again!

I’ve got something that probably isn’t a bug but more a feature request. I noticed that selectbox_link fields don’t work with the Caption of a Subsection Manager.

It would be great if these fields could display something in the Caption, but it’s not necessary for what I’m doing. If they cannot, however, then they should not be listed as suggestions below the Caption field.

Ben, could you please post this as a feature request on GitHub? Thanks.

May I ask how it comes that you combine a Subsection and a Selectbox Link? It’s one of the use cases that I didn’t really think of (I seem to wrong here).

Ben, could you please post this as a feature request on GitHub? Thanks.

Done

May I ask how it comes that you combine a Subsection and a Selectbox Link?

Sure. (And maybe you can even suggest a better way of doing this.) I have a “Book Reviews” section and a “Book Lists” section. I’m using Subsection Manager to add multiple book reviews to a list entry. However, for each item in a list, I might want to include an optional “blurb” that explains why I’ve chosen to include this book on this list. Since the blurb is specific to that list, and books may be on any number of lists, I can’t just add a field to the “Book Reviews” section. Likewise, because the number of books on a list varies, I can’t add blurb fields to the “Book Lists” section.

So I’ve created a third section, “Book List Blurbs,” with three fields: two selectbox_link fields associate the entry with a list and a book review, respectively; and there is a textarea for the actual blurb. Then I added a second Subsection Manager field to the “Book Lists” section that lets me select blurbs.

It occurs to me now that if Subsection Manager is handling the association between a blurb and a list, then I probably don’t need the link field in the blurb section itself.

Attachments:
lists_section.png

So far the user interface of Subsection Manager 1.0.1 is working well for me.

But the earlier problem I had with Mediathek using a mediathek/subsection field for parameter output hasn’t been resolved. The comma-space delimited id string only returns the first entry in the list. (mediathek thread)

Also, I’m not sure if this is a misunderstanding on my part or not, but a nice feature for future versions would be to always return a count of subsection items within the section entry XML element or in its subsection XML element. When I use a select box link in a section, and “Include a count of entries in associated sections” is checked in the ds, an attribute for the section entry is generated in the XML that gives a count of linked entries. For the subsection manager, this count appears in the subsection XML, but only if you have selected at least one subsection field to display in the XML. If you have no fields selected, the subsection doesn’t show up at all, even though core empty fields will show up as <field />.

In my scenario, a ds returns a list section entries, but, depending on the situation, I only want to display entries that have at least one subsection item. The only way to get the count is for at least one field per subsection item to be generated in the XML, and if you have a lot of section/subsection entries, that could be wasteful.

Nils,

may I ask you what are the right steps to manually update the Subsection Manager from a beta version to the new release?

Right now I’m uploading the folders of the new release and replacing the beta ones. After I’ve done it, I have to enable again the Subsection Manager extension but if I want to modify the section where the Subsection Manager field is used, Symphony doesn’t allow me to save it anymore and I got the following error:

“Symphony Fatal Database Error Unknown column ‘allow_multiple’ in ‘field list’ An error occurred while attempting to execute the following query • INSERT INTO sym_fields_subsectionmanager (field_id, subsection_id, allow_multiple, show_preview, caption, included_fields) VALUES (‘23’, ‘6’, ‘1’, ‘1’, ‘{$title}’, ‘20,21’)”

Can you help me, please?

Thanks!

I’m reworking a blog to use the Subsection Manager for image/attachment management, but I’m also using Section Schemas for a tag cloud and getting an error that was mentioned by designermonkey here:

http://getsymphony.com/discuss/thread/41122/7/#position-129

"Fatal error: Call to a member function addScriptToHead() on a non-object in C:projectsftc-symphonyextensionssubsectionmanagerfieldsfield.subsectionmanager.php  on line 305"

Nils had replied:

“This seems to be connected to the Section Schema’s internal workings and how it calls the Subsection Manager — I’ll have a look at it and will chat with Nick if this can not be solved on my side.”

Was there any progress on getting the Section Schemas working with Subsection Manager?

Sorry guys for not posting earlier but I was away from my computer over the last days.

@Andrea: This is how your database should look like to match the 1.0 structure (sym_ should be your own database prefix):

CREATE TABLE `sym_fields_stage` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `field_id` int(11) unsigned NOT NULL default '0',
  `constructable` smallint(1) default '0',
  `destructable` smallint(1) default '0',
  `draggable` smallint(1) default '0',
  `droppable` smallint(1) default '0',
  `searchable` smallint(1) default '0',
  `context` varchar(255) default NULL,
  PRIMARY KEY  (`id`)
);

CREATE TABLE `sym_fields_subsectionmanager` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `field_id` int(11) unsigned NOT NULL default '0',
  `subsection_id` varchar(255) NOT NULL default '',
  `filter_tags` text,
  `caption` text,
  `included_fields` text,
  `allow_multiple` tinyint(1) default '0',
  `show_preview` tinyint(1) default '0',
  PRIMARY KEY  (`id`),
  KEY `field_id` (`field_id`)
);

CREATE TABLE `sym_fields_subsectionmanager_sorting` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `entry_id` int(11) NOT NULL default '0',
  `field_id` int(11) NOT NULL default '0',
  `order` text,
  PRIMARY KEY  (`id`)
);

Does this help?

@Brien: I have never really been working with Section Schemas in the meantime and haven’t found the time to chat with Nick. What’s the exact error you are getting using the latest versions of both extensions?

Was there any progress on getting the Section Schemas working with Subsection Manager?

Mediathek was incompatible, so it’s likely that Subsection Manager will be too. The technical reason is that Section Schemas calls the “displayPublishPanel” method of each field class, to get the backend HTML markup. However developers will (rightly) assume that “displayPublishPanel” will only ever be called in the context of a backend page, and not a frontend page, and so they use references to the Administration class (and so on) which will cause errors on the frontend.

To save developers rewriting extensions (and indeed sometimes it is not possible to fix), Section Schemas keeps a list of known incompatible fields to which Subsection Manager can be added:

http://github.com/bauhouse/section_schemas/blob/master/extension.driver.php#L8

What information does the Section Schema need? Maybe we could add a fallback for the Subsection Manager inside your extension?

It takes the XMLElement returned from the displayPublishPanel, converts to a string and parses as XML. It does this to get static/dynamic options of select boxes and tag lists. By adding Subsection Manager to the incompatible list, the field still shows in the “schema” XML (with its meta data) but without static/dynamic values (which isn’t a big deal).

I just installed Section Schema and added Subsection Manager to the list of incompatible extensions. It doesn’t really return a good overview of the extension as all the stage settings are missing. It would be quite easy to add special Subsection Manager handling to Section Schema. What should Subsection Manager return? A full report of its settings or just a selected few? (Sorry, I never used Nick’s extension before, so I’m not sure about its different use cases.)

Hi all, I receive a MySql Error if I try to using The Subsection Manager Filter in a Data Source, the query tries to find values in a column called “value” instead in the column “relation_id”; Any solution for the problem? Thanks!!

Mario, could you please post a few more details about your setup and the error message? Thanks!

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