Search

Hey all I am new Symphony user. I have annoying problem with select box link field. I can't filter this field in DataSource. I using param {$order-number} (this is order ID). The XML result should be a list with order items, but output is empty ;/ When I removed param I recived all order items from my DS.

I am sure the param is correct. There is something wrong with SBL field data, but i dont know what ... any ideas ?

Greet

If it is a plain number, then it is probably conflicting with the 'entry ID' for the linked order number.

The way the field works is to look for entry IDs and also handles of entries. I reckon it is getting confused.

Can you log this as an issue on github for the field and I'll try and look into it asap.

I trying filter Order number SBL field (from Order items DS) by {$order-number} (from Order DS)

{$order-number} is equal 666

Single entry looks like that:

<entry id="693">
   <order-number>
     <item id="488" handle="666" section-handle="orders" section-name="Orders">666</item>
   </order-number>
 </entry>

but output is:

<order-items>
  <section id="36" handle="order-items">Order Items</section>
  <error>No records found.</error>
</order-items>

Yeah, the filtering logic in the field is definitely getting confused with the numbers. A quick fix is to use the Reflection Field to concatenate your order number with a string, like order-666 and use that for the select box link value. That way the filtering logic has a alphanumeric handle to look up, rather than get confused over two numeric values.

You would add the Reflection Field to the orders section, and use this xpath: concat('order-', entry/order-number/@handle) replacing order-number with whatever your field is called.

Edit: If you already have many entries in that section, to create the Reflections for every one, I recommend the Resave Entries extension to quickly do that for you.

Thank you so much! The problem is resolved.

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