Search

Ok =)

About ajax: my english is toooooo bad but I'll try to explain:

I mean google suggest-like loading items for this field instead of loading all items (I have >500 items at now) with page.

Oh I see. Yeah, I'd love to do that. Don't quite know how at the moment but I'll give it a try in a few weeks.

Thank you! :)

‘Hat tip’ to czheng for this one. Just what the client was looking for. However I’m struggling to get this to output in a parameter. To explain, I have a Product section, with a Reference Link to an Image section, works great. I then have a DS which pulls records from the Products section and outputs the Image Reference Link as a parameter (thus creating a ds-product-image parameter to pull product image details with) I can make this output the Image reference into the XML, but not as a parameter. Any ideas?

No, but I’ll look into it. Hopefully something simple.

@AppSol: I’ve got clean installs, from Github, of the master branch of Symphony and the latest version of ReferenceLink, and cannot reproduce this problem. In my tests, I’m able to use a ReferenceLink field to generate DS parameter output, both for single- and multiple-entry views.

Can you give me any more details about your problem?

@czheng: I got to the bottom of this. It’s actually in field.selectbox_link.php on line 34 it reads:

public function getParameterPoolValue($data){
    return $data['relation_id'];
}

which causes problems when $data[‘relation_id’] is an array, so I’ve changed to:

public function getParameterPoolValue($data){
    return is_array($data['relation_id'])?
        implode(', ',$data['relation_id']) :
        $data['relation_id'];
}

and it seems tickety-boo now. It could be I’m on an older branch of selectBoxLink as it’s the plain vanilla that comes with 2.2 download from this site.

Reference Link field updated to version 1.3 on 8th of January 2010

Updated by brendo for 2.0.7 compatibility.

I have the version 1.3 extension enabled on a Symphony 2.0.7RC2 install and I have an issue where a Symphony Fatal Database Error occurs when saving an entry with a null value when “Allow selection of multiple options” is not checked or when the Field Type is set to “Select Box”.

What version on the SelectBox Link Field are you running?

The Reference Link extends the majority of the SelectBox Link field, and I believe this error has been fixed in a later version of the field.

Try updating it to the most recent :)

I’m using Select Box Link Field version 1.18, the latest from GitHub.

Hmm, can you confirm the table definition for sym_entries_data_84 has relation_id set to allow null?

Could it be possible that this system was upgraded from earlier versions of the SBL?

I’m thinking that this section was created when an earlier version of SBL was installed (when relation_id was not null) and now that it has been updated, the field tables have no been updated to allow for null.

Normally this would work on the SBL end (ie. you update the SBL and it would trigger each of it’s tables to update as well), but in this case it won’t. This is because the Reference Link keeps it’s own record of it’s related field tables so it should be responsible for updating the tables to match the new SBL table definition.

Good spot really.

The Reference Link will need to be updated with lines 33-56 of the SBL.

This has been fixed in my commit and I’ve sent a pull to craig.

Unfortunately it won’t work immediately until the extension’s version is incremented (as it runs from within the update function).

@brendo, thanks for looking into this. I tried pulling your commit then forcing an update by changing the version number to 1.3.1 and enabling the extension. I’m still getting the same behaviour, though. I suppose I could manually update the database tables, but I’m no SQL expert. What would the query be? (I’m using phpMyAdmin, so I can monkey around in there.) Based on your commit, it looks like I would need to run the following query:

ALTER TABLE `sym_entries_data_84` CHANGE `relation_id` `relation_id` INT(11) UNSIGNED NULL DEFAULT NULL;

Is that right?

Right, because the update was only testing for versions less than 1.3 which is what you were on.

Have pulled brendo’s changes, updated version to 1.3.1 and tweaked the update parameters. Grab it from Github and see if that works. If so, I’ll officially update the extension here on the site.

Thanks guys.

By the way, brendo, it appears you’ve taken it upon yourself to personally fix all of my extensions. Very much appreciated. I might have to start changing the way I list them, though. Maybe like songs:

“Reference Link,” by czheng featuring brendo

Lol.

Thanks, Craig. That’s working much better now.

Haha, I’m afraid I’m more of a fixer than inventor it would seem :)

The Problem

I appreciate any help you all can give. This is likely a simple fix that I’m just blind to at this point. Thanks in advance for your time, labor and help.

When I post the form only the first of the checkbox values is saved to the database. How can I have multiple values?

I’ve got a series of checkboxes like so:

HTML Output

<li id="option-tags" class="checkbox-list-option first span-8 column first last">
<div id="wrap-tags-202" class="span-8 column first last">
  <label onclick="chkBoxListUpdate({ handle:'tags', value:'202' });">Tag 1</label>
  <input id="fields-tags-202" name="fields[tags][]" type="checkbox" class="checkbox span-8 column first last" value="202" />
</div>

The above HTML input[type=checkbox] fields are populated from the following XML

Tags XML

<tags>
<section id="6" handle="tags">Tags</section>
<entry id="202" video="0">
    <description mode="formatted" />
    <name handle="tag-1">Tag 1</name>
</entry>
<entry id="201" video="0">
    <description mode="formatted" />
    <name handle="tag-2">Tag 2</name>
</entry>
<entry id="200" video="0">
    <description mode="formatted" />
    <name handle="tag-3">Tag 3</name>
</entry>
<entry id="199" video="0">
    <description mode="formatted" />
    <name handle="tag-4">Tag 4</name>
</entry>

My section settings:

section-settings See larger image

Attachments:
reference-link-tags.png

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