Search

You'd have to customize your data source and override the parameter. Just add something like

if ($this->dsParamFILTERS['your_field_id'] == 'all') {
    $this->dsParamFILTERS['your_field_id'] = 'sql:NULL';
}

before the try ... catch block in the grab method of your data source and don't forget to return false in the allowEditorToParse method to prevent overriding the changes with the data source editor.

tx it works great :) but I have used this to ommit the first page parameters and use the others

if ($this->dsParamFILTERS['your_field_id'] == 'all') {
    $this->dsParamFILTERS['your_field_id'] = NULL;
}

I think I'm having the same issue that this comment.

I have a "service categories" section that list all my categories in an input field. Then I have a "services" section that holds all the details for each service.

I am using the "select box link" to link both section.

In my "services" data source I would like to group my services by categories. I doesn't seems to work. I'm using 2.2.

Here is the XML I get:

<services>
    <section id="4" handle="services">Services</section>
    <categorie link-id="" link-handle="" value="">
        <entry id="26">
            <nom handle="pliage">Pliage</nom>
            <contenu mode="formatted"><p>En plus du pli simple et pli croisé utilisé dans la réalisation de brochures et de livres, il existe aussi le pli économique, le pli roulé, le pli accordéon, le pli fenêtre et le pli porte-feuille.</p></contenu>
        </entry>

Is this normal behavior?

I have been already grouping a data source on a select box static field, but can't make it work on the select box link.

I'm I missing something? could someone give me an advice? I'm new to symphony so I'm not sure.

Thanks

Is the Select Box Link field set to allow multiple? Grouping does't work with this option.

No it is not. It just a required field.

Do you know what this field is about?

"Display field’s value in entries table"

I have removed my category field and added it back again in my section and now it is working.. looks mysterious to me

I'm not sure if this is a selectbox_link_field issue or a members extension issue. I'll post this here until someone says otherwise. Thank you in advance for your help.

Synopsis

I've spent the day converting a project FROM Symphony 2.1.0 using members extension (unsure of the git tag - it was the one with unified username and password fields and the memberlink) TO Symphony 2.2.1 and members 1.0 beta 3 thanks to some helpful correspondence from @bauhouse.

Everything seemed to go fine. I rebuilt the Members Section and pointed the members extension to it via the Preferences page. However, now when I try and view the Members Section in Symphony I get the following error that seems to indicate the error lies in the selectbox_link_field (v 1.19 and v 1.18):

    Missing argument 1 for Field::__construct(), called in /Users/wjn/Sites/pcpc.org/subdomains/cp/public/extensions/selectbox_link_field/fields/field.selectbox_link.php on line 11 and defined
/Users/wjn/Sites/pcpc.org/subdomains/cp/public/symphony/lib/toolkit/class.field.php line 158

153      *
154      * @param mixed $parent
155      *  The class that created this Field object, usually the FieldManager,
156      *  passed by reference.
157      */
158     public function __construct(&$parent){
159         $this->_Parent = $parent;
160         $this->_engine = Symphony::Engine();
161         $this->_handle = (strtolower(get_class($this)) == 'field' ? 'field' : strtolower(substr(get_class($this), 5)));
162         $this->Database = Symphony::Database();

Can anyone point me in the right direction for a solution?

SOLVED

Not sure what the issue was exactly. I had tried to uninstall and then reinstall the selectboxlinkfield; however, because I used the field in many sections I was forbidden that path by the system. So here's how I got things working:

  1. In my git root directory I ran these codes

    $ git rm -r --cached extensions/selectboxlinkfield

    $ rm -R extensions/selectboxlinkfield

    $ git submodule add git://github.com/symphonycms/selectboxlinkfield.git extensions/selectboxlinkfield

  2. Then I went to the /symphony/system/extensions/ page in Symphony CMS. The Field: Selectbox Link "enabled" column read: "Enable to install 1.19"

  3. I enabled the reinstalled version of the extension and all is working.

Hope this helps someone.

it is possible to have default select value in the selectbox link ? i dont want the first entry of the selectbox link to be the default value, i want to have my own default value in the selectbox link whether it is possible ?

@jeeva, the Select Box Link has no value for default. I think it's due to it selecting from a dynamic list of entries that haven't necessary been created yet, and then the default value may be deleted after being set which would cause problems.

What is this? Somebody help me.

in_array() expects parameter 2 to be array, null given
/Applications/XAMPP/xamppfiles/htdocs/sites/integratio/en/extensions/selectbox_link_field/fields/field.selectbox_link.php line 482

477
478             $fields = array();
479
480             foreach($group['fields'] as $f){
481                 if($f->get('id') != $this->get('id') && $f->canPrePopulate()){
482                     $fields[] = array($f->get('id'), @in_array($f->get('id'), $this->get('related_field_id')), $f->get('label'));
483                 }
484             }
485
486             if(is_array($fields) && !empty($fields)) $options[] = array('label' => $group['section']->get('name'), 'options' => $fields);

@jhenriquefm

If this is the same issue I occasionally have with this extension, you might try emptying the sym_cache table in your Symphony database. That has cleared this up for me in the past.

Hi,

I fixed a bug the occured with the internal caching. It had my mind buzzing for a couple of days. Here is what happened:

  • I have three sections: A, B and C.
  • Section A has two fields: 'Name' and 'Location'.
  • Section B and C have a selectbox link field to the entries of section A.
  • Section B chooses as 'value' in the section editor the field 'Name' of section A.
  • Section C chooses as 'value' in the section editor the field 'Location' of section A.
  • I create two datasources: datasource B with the entries of section B, and datasource C with the entries of section C.
  • I create a page and add these two datasource to the page.

Now the expected result is:

  • Datasource B shows the items of the selectbox link field with value 'Name'.
  • Datasource C shows the items of the selectbox link field with value 'Location'.

But what happens is that both datasource B and C show the items with value 'Name'. This is wrong!

The error occurs because of the self::$cacheRelations, self::$cacheFields and self::$cacheValues-fields in the field.selectbox_link.php-file. These arrays only use an ID as key for caching. Because of this method, whenever an ID is used twice (for example, the entry in the above example is shown as well in datasource B as in datasource C) it no longer looks for the correct value, but instead prefers the cached result over it.

I've fixed this by changing the key of the caching arrays to a more solid key which combines the ID of the field and the ID of the relation or the entry (depends on each array).

Pull request

@jhenriquefm I've pushed a commit that will prevent this happening

@kanduvisla, @vlad Thanks for the pull request's, I've merged them into integration

I've started a bit of a code cleanup of the SBL as it's been in need of a bit of a love for awhile. Expect an updated version to be released alongside Symphony 2.2.2 :)

I've made some exciting changes (and discoveries along the way) to the SBL that'll be the upcoming release.

For anyone who has delved into the code, SBL had some pretty horrible homebrew caching that attempted to create static stores of the relationships in the field. It was less than ideal and in hindsight, probably used more memory than it saved. This has all been removed and simplified down to a single function that's much clearer to follow.

In addition to that, the SBL logic was based a lot around working with a single relation_id. While it made some of the code easier, it causes a blowout in queries (and therefore memory). This has now be resolved so that the utility functions expect an array of relation_id.

It's probably best to show the gains in a real use case (which I imagine is fairly typical setup). I had two sections, events and artists. The Select Box Link was in the events section pointing at artists. The two screenshots show the before and after of these changes. The changes will also make backend editing more responsive as well.

Before After

Attachments:
Screen shot 2011-07-17 at 5.35.27 PM.png and Screen shot 2011-07-17 at 5.35.21 PM.png

That looks fantastic!

Good job!

@brendo: nice job brendo !

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