Search

Nils, is there any way around my issue that you can think of?

Sorry, but I never used Cacheable Data Sources. I have no idea how it works exactly.

Nils, can you confirm if this is an actual fix or if it is going to mess up the extension in ways unforeseen to me?

I'm not entirely sure about step 2 but as long as it's working for you just stick to it.

Empty but not NULL

The following things are considered to be empty:

  • "" (an empty string)
  • 0 (0 as an integer)
  • 0.0 (0 as a float)
  • "0" (0 as a string)
  • NULL
  • FALSE
  • array() (an empty array)
  • var $var; (a variable declared, but without a value in a class)

From php.net function empty()


So, in my Narrowing the scope of the Fatal Error post Step 1. (requiring the extension.driver.php file) seems right.

Step 2 is questionable in my mind (no that I've had a few hours of sleep). I had suggested changing this:

if(empty($entry)) {
...

to this:

if(empty($entry) && !is_null($entry)) {
...

At first glance this might seem contradictory, but keep in mind that empty() and is_null() in PHP are not coterminous. Adding !is_null($entry) causes the if statement to ignore NULL values, giving us a resultant empty() list like this (a line-item veto if you will):

  • "" (an empty string)
  • 0 (0 as an integer)
  • 0.0 (0 as a float)
  • "0" (0 as a string)
  • ~~NULL~~ <--- omitted
  • FALSE
  • array() (an empty array)
  • var $var; (a variable declared, but without a value in a class)

The question I have for the forum is whether or not omitting the NULL check here causes problems for the extension in spite of solving my immediate problem.

So I updated to SSM2 on one of my larger projects and am no longer able to access most of my Datasources per these Fatal Errors:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 113 bytes) in /Users/wjn/Sites/pcpc.org/subdomains/flo/public/symphony/lib/toolkit/class.field.php on line 875

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32 bytes) in /Users/wjn/Sites/pcpc.org/subdomains/flo/public/symphony/lib/toolkit/class.widget.php on line 32

I'm unsure if this is directly from the installation of SSM2, but it's the only thing I've changed before these Fatal errors started springing up.

Any guidance from the community would be appreciated.

Resolved

I upped the memory_limit in the php.ini file to 128M from 32M and it works.

Hi Guys,

I am having a bit of a tuff time with subsection manager and a custom datasource. Would be great if anyone could lend a hand. My question is here..

http://getsymphony.com/discuss/thread/86255/

wjnielsen fix worked for me too. Had the same issue with Subsection Manager 2 along with SymQL when selecting a Subsection Field. Many thanks!

Faddee, don't tell anyone on the forum that I had a fix that worked. You'll ruin my reputation here.

Busted.

Sorry.

Realized later today that SymQL didn't fetch any child entries of any Subsection field. Just some Subsection field data. DOH!

Made a nasty workaround. I could publish it but I guess it would do more harm than any good. ...and I have to worry about my reputation as well. ;)

Is it possible to set dynamic values in the filter field? for example the value of a selectbox in the same section?

Are you talking about Data Source filtering? If so, yes that should be possible (at least when you pass IDs - not sure about field values at the moment).

I actualy mean filtering the subsection list in ssm itself...
See the screenshot.
I' would like to set these filters with a variable value if that's possible.
And yes the variable would be the value of a selectbox field in the parent section.

Attachments:
Schermafbeelding 2012-04-12 om 22.23.10.png

This not possible with SSM because the filtering is not done via JavaScript.

Why don't you use Select Box Link Combo? It allows updating one select by another.

Hi Nils
I was afraid this was not possible, but you never know... I' will give the SBLC a go... thanks

Edit

This not possible with SSM because the filtering is not done via JavaScript.

It does not need to be live updated when you change the value of the selectbox, just when you click save.. it needs to be filtered by the value of the field stored in the database... so i gues that wouldn't need javascript... (still don't know if that's possible...)

I'm not sure about you exact setup but the main purpose of SBLC is that you chain select box links based on their values. I used the field once and it did a good job.

My Scenario is:

People can subscribe via a front-end form for a sport event. The form has a hidden field (selectbox) which value is set to the sportevent (through url parameter). So all subscribers end up in the same section with a (selectbox)field set at the event they subscribed to.

Now in the sportsevent's section you have a selectbox (this could be any kind of selectbox like ssm) where you can select the subscribers, so they can be ordered in groups… Problem now is that in the selectbox all subscribers to all events appear. I only want the subscribers to appear in the selectbox that have subscribed to this current sportsevent.

That should work with Select Box Link Combo: I once used it at university to filter courses based on the term. So I had two select boxes, one with all courses and one with all terms. When I switched terms the courses got filtered and only displayed the ones belonging to the selected term. So you should definitely have a look at SBLC.

If you prefer the SSM interface you could add your groups to the items caption and add a custom script to the backend that hides items in SSM. It's not that complicated and I guess you could reuse code provided by SBLC but it's nothing that SSM offers right now or will in the near future.

Thanks a lot, i will dive into these options...

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