Search

Edit: my mistake!

Can you check if you have a column named hide_association in the sections_associaton table? If not, the Symphony updater probably didn't run the following statement

 'ALTER TABLE `TBL_ sections_association` CHANGE  `cascading_deletion` `hide_association` enum("yes","no") COLLATE utf8_unicode_ci NOT NULL DEFAULT "no";'

You could change the column manually. What was your original Symphony version?

If there is a way to do the "count" functionality i presented, I think this would also make it possible to filter by the id/name of the "category" you are looking for. as it stands right now, when you try and filter via the id/name against a data source, there is a mysql error thrown

MySQL Error (1054): Unknown column 't8_1.value' in 'where clause' in query "SELECT SQL_CACHE `e`.id,
                    `e`.section_id, e.`author_id`,
                    UNIX_TIMESTAMP(e.`creation_date`) AS `creation_date`
            FROM `sym_entries` AS `e`

                LEFT JOIN
                    `sym_entries_data_8` AS t8_1
                    ON (e.id = t8_1.entry_id)
            LEFT OUTER JOIN `sym_entries_data_1` AS `ed` ON (`e`.`id` = `ed`.`entry_id`) 
            WHERE 1

            AND `e`.`section_id` = '1' 

                AND t8_1.value IN ('5')

            ORDER BY `ed`.`value` ASC
            LIMIT 0, 20"

I'm sure this is an issue b/c the entries are not tracked against the categories themselves, rather, it's the other way around. So when you pull up an entry, you get all the associated categories for that entry, but cannot get all the associated entries for a category.

edit: looks like this is what the reference link extension craig wrote. Having this functionality for the SSM, though, would make symphony that much more dynamic since you can create new content on the fly from within an entry. I think if you can combine these two extensions in some way, you would get even more bloggers to use this cms. Wordpress has something similar where you can create categories on the fly from within a post as well. that is the only draw back to what craig created. I'm not sure what is under the hood of the SSM, so i would not know if it is even feasible or not.

wtdtan, that error is probably the same problem that was reported before. In which case You should try this fix.

@ahwayakchih - yup, that seemed to do the trick (only did a quick test, though).

Niels, any reason why that code wasn't committed? It seemed like you fixed it ~6 months ago.

Also, i think I see the code that counts the number of times a category has been used (fetchAssociatedEntryCount), but i'm not sure how/where that is getting used.

Also, i think I see the code that counts the number of times a category has been used (fetchAssociatedEntryCount), but i'm not sure how/where that is getting used.

The function is called when you check "Show number of related entries" (or similar) in the Data Source editor. This way, you can just get the number if related entries without having to include the subsection field to output it's data.

Nils, any reason why that code wasn't committed? It seemed like you fixed it ~6 months ago.

As I mentioned before in this thread, this is a result of a failed branch merging during the development of SSM 1.1. The code was in the repository six month ago and it's in my current development copy, see https://github.com/nilshoerrmann/subsectionmanager/commit/19f44d56c75e2e5cc88bcba01818c9f8e9baa333

@nils - that makes sense...hard to find this stuff out when you're like me and don't completely read everything =)... i've learned this lesson many times using git-svn at my work, but then it finally clicked with me as to how different git is from svn.

@klaftertief - thanks for pointing this out...i noticed that when i updated, but forgot about it b/c I was so used to getting that value a different way in older builds. now, after my last few posts in this thread, I can basically erase all of that b/c this stuff was there all along!

this is definitely a one of many defacto standard extensions that should belong in everyone's arsenal!

edit - i may have jumped the gun on what i said before as I am not seeing the Include a count of entries in associated sections number in my data source now. I saw it earlier, but for some reason it's only giving me the entry ID.

This is my set up:

Entries section
Categories section

Categories is included into an Entry via the SSM - giving the entry the ability to create new categories within the entry itself (like how this extension has always been working).

I create a new Data Source to list out just my Categories with the following options:

Name: Homepage Categories
Source: Categories
FIlter Results - none added (a `category` is always published when created)
Sort by: Title, Sort Order: Ascending
No paging results
XML Output: Title only
Include a count of entries in associated sections: Yes

When i go view my data source on the debug page, I get a list of all my Categories fine, but then there is only the @id on the homepage-categories > entry, no count associated with the number of entries that category has been associated with. Is there something else I am missing?

the image attached is to show what i am getting as an output right now.

Attachments:
Screen shot 2011-03-26 at 2.31.26 PM.png

I think you have to attach your subsection field in the data source editor without selecting subsection fields in the section settings.

PS: I know that it's confusing that you have to manage the data source output in the section editor and the data source editor. It's a general Symphony limitation. But I think I found a way to work around this in the next version.

@nils, i don't really follow.

attach your subsection field in the data source

So i have my categories section which is a subsection of entries. I would create a data source for categories and then just include that for output on my page?

without selecting subsection fields in the section settings.

that makes it seem like you don't include the subsection in the section itself?

I think I found a way to work around this in the next version.

any idea on when that next release may be?

@nils, i don't really follow.

Due to the current system structure of Symphony there are two places where SSM stores informations for data sources:

  • in the section editor where you select the subsection fields that should be included and
  • in the data source editor where you attach the SSM field to your data source.

In order to get the count you need to check Include a count of entries in associated sections and add the SSM field to your data source.

any idea on when that next release may be?

Hopefully end of next month. There will be a beta version to prepare that release.

Feature Request: Ability to set a limit in the Section Editor for the number of items that can be added to a single entry

Would be helpful to enforce Business Logic like 'choose two images', etc.

PS: I know that it's confusing that you have to manage the data source output in the section editor and the data source editor. It's a general Symphony limitation. But I think I found a way to work around this in the next version.

Thought about using 'modes'?

(accidentally double posted the above comment.)

@nils - ok, so i guess i did follow what you're saying b/c that is what i did, but the output is still not the one I was looking for. When i click the Include a count of entries in associated sections box, it is giving the number of subsection items there are in the post. By this logic, it would seem that my categories would need to have entries ordered to them in order to get the "total" output, not the way that has been described.

Thought about using 'modes'?

Modes would have to be passed as array to make this work because SSM groups all subsection fields in a single XML node. Courently each mode's output will be created separately. I made a request to change this but it was considered as a compatibility problem: the textarea field implementation would have been affected and it wasn't clear how many extensions rely on the current setup.

Nils, this is more of a Stage than a subsection manager problem, but still I think this is the best way to post it.

Right now, Stage is bundled with a few extensions (datetime, subsection manager to name two). However, if both extensions use Stage, it will be included twice in the frontend (javascript).

This duplicates all "create new" actions, and things alike.

The same problem appears in the backend, where if(!class_exists("Stage")) has to be used to prevent double includes.

Now, my suggestion would be not to bundle stage with every extension in the lib folder, but to bundle it as a seperate extension. That way two extensions can share the files and resources, preventing the problems described above.

I came across this as well, aside from your suggestion, there is a quicker fix.

In SSM, the stage.js is added via addScriptToHead with duplicate checking on. The problem is that it appends ?v=1.1 to the end of it, so the duplicate check sees it as a different file to the stage included by Datetime. Removing the ?v=1.1 fixes the issue, as the duplicate logic detects the two scripts as a duplicate and only includes one.

I'm aware of this issue. Date and Time is not released yet and not optimized for this case - that's the reason why it's not working yet.

Sorry, but this was a busy month so I haven't found the time to work on Date and Time.

It's not really a Date & Time issue, because if you append the ?v=1.1 to the Date & Time, from what I can see it's the version of the extension, not Stage, so there is still the potential for an overlap.

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