Search

A new extension, "Selectbox Link Field Combo" is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

That Github link on the extension page is very strange...

Ah it should be the URL of the repository page on Github, rather than the SSH-clone URL of the git repo itself.

Fixed.

Hmmm, I installed it (using the Symphony development branch), and the section editor breaks for most of my sections:

Invalid argument supplied for foreach()
/var/www/maschine/extensions/selectbox_link_field_combo/fields/field.selectbox_link_combo.php line 648

643         
644         if ( $mode == 'parent' ) { $op1 = 'OR'; $op2 = '='; }
645         else { $op1 = 'AND'; $op2 = '!='; }
646         
647         $where = '';
648         foreach ( $fields as $field ) {
649             $where .= ( !empty($where) ) ? " {$op1} " : '';
650             $where .= "field_id {$op2} ". $field->get('id') .' ';
651         }
652         $where = 'WHERE '. $where;

I suspect there is no SBL created anywhere. I will add some checks to fail gracefully.

Just to be sure, have you created any SBL in any section? A SBLC from current section needs a SBL to be created in another section from where to get the relation and an existing SBL in current section to be the parent.

I designed the field creation flow to be the same as the one in the example.

:-) Well, I simply installed the extension, and then the section editor broke for most of the existing sections. I have not created an SBLC field in any section, because they were inaccessible.

Yup, I have your error. I'm working on it now.

I have not created an SBLC field in any section, because they were inaccessible.

I was referring to SBL not SBLC. A SBLC needs at least one existing SBL in current section.

Update: Issue fixed. It will simply display disabled selects if there is no possible parent or relation.

I just noticed that the backend JS works ONLY in Firefox 3.6. Does anyone has any idea why this happens? Chrome 8, Opera 11, IE8 and Safari 5 all fail...

Take Chrome for example. It adds the necessary attributes to hide the unnecessary <option>s but they still appear.

Is there anyone else experiencing this behavior?

I'm shocked :)

Sorry, I should have read your post before posting the bug to Github. Feel free to close it (or leave it there as reminder).

This extension has a very interesting concept! Congratulations!

Thanks, Michael.

Out of curiosity, do you have any idea what's with the JS malfunction in all browsers except FF 3.6? See above post, no #9.

Edit: I should have read your issue before posting here :))

:-)

Sorry, I have no idea.

Selectbox Link Field Combo updated to version 1.0beta2 on 23rd of May 2011

Changes

  • Field rewrite. Better error checking on field settings.
  • New and improved JS (good job Nils)

One method's visibility in SBL needs to be changed from private to protected for derived classes compatibility. Integrate this commit in your SBL class until it is merged on master SBL repo.

This version is NOT compatible with previous. You must uninstall and reinstall the extension to work.

Available on development branch https://github.com/vlad-ghita/selectbox_link_field_combo/tree/1.0beta2

@Craig, @Brendan: Will the mentioned pull request be integrated? (If not, the situation with the SBLC extension is a bit "unstable"...)

If they will decide to not integrate it, I'll duplicate the code from SBL ...

If the update fixes a fundamental issue of an official extension, there is no reason not to integrate it. Both Brendan and Craig are busy these few days but rest assured someone from the core working group or myself will review the code and pull soon.

@vladG I've pulled your request into the integration branch along with Giel's and a couple of other commits. An updated version of SBL will be released with Symphony 2.2.2 (July/August).

Hope that eases your mind :)

I've got a use case that does not seem to work. The problem is that I cannot select a Relation which is self-referencing. Why would I want to do this?

What if you have a Pages section that is being used to add pages to different versions of a site (as part of a process to design wireframes). Pages can also be nested by selecting a Parent Page. Because there are different versions of the same page names, it is impossible to tell which version of a page is being selected in the Parent Page selectbox link field. So, I was hoping that it would be possible to use the Selectbox Link Field Combo to be able to filter the pages available as options by the version number. But the option to choose the current section is not available from the Relation select menu.

I was thinking that I might be able to use the Reflection field to concatenate the page title and version number and use this value for the Selectbox Link field. But I was getting database errors when trying to save. :-(

So, the best solution so far seems to be the Subection Manager field. But then there is a tradeoff in functionality. It is no longer possible to apply a Parent Page to multiple pages using the With Selected... select menu. And the Parent Page value in the table index is no longer a clickable link. It works, but the Subsection Manager field seems overkill for this particular application.

Is there any chance that this field could allow self-referential relationships?

Edit: Now that I think about it, because of the potentially high number of pages, I probably need something like a Reference Link field with the ability to define a Caption, similar to the Subsection Manager, with autocomplete search.

The autocomplete search of the reference link field is fast as lightning!

The autocomplete search of the reference link field is fast as lightning!

If it really is then maybe we should borrow some of the code for the SSM. I have crashed my browser a few times because it is really, really slow..

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