Search

It’s evaluated as XSLT. For an average yes, you’d surround them with brackets but to divide you need to use the div operator.

{(number(entry/field1) + number(entry/field2) + number(entry/field3)) div 5}

Reflection Field updated to version 1.0.8 on 9th of December 2009

I have an event connected to a section with a reflection field. Creating or editing an entry in this section via the event doesn’t set the reflection field. The event is slightly modified. I’m just setting some fields manually.

It seems that compileFrontendFields doesn’t get called from the EventPostSaveFilter delegate. I tried printing out some debugging and exiting the script.

Any ideas what might be wrong? It’s Symphony 2.0.6 and Reflection Field 1.0.8.

Thanks,
Jonas

EDIT: Just downloaded the new versions of the system (2.0.7) and the extension (1.0.8), now it works!

I can’t get this to work how I want it to…

I’m trying to use the substring-before() function of xPath, yet it won’t fill the field in.

My entry is at: entry/image/filename (if i add that to the field, it outputs ok)

I would have thought then that I needed: {substring-before(entry/image/filename, ‘.jpg’)} to remove the .jpg from the filename into the reflection field.

Does anyone know how to achieve this??

EDIT: I just tried it again, and it worked this time… Weird.

This doesn’t work in conjunction woth the Mass Upload Utility. None of the reflection fields are filled in when I publish via this extension.

I can only use it in newly created sections (Symphony 2.1). When adding to an already existing section it returns nothing and does not appear in the output XML.

Ah this is because the field’s value is re-evaluated at the point at which you save an entry. If you are adding it to a section that already contains entries you will need to re-save each entry to trigger the field to update.

That did the trick. Thank you.

Reflection Field updated to version 1.0.9 on 1st of November 2010

Changelog

  • Bug with usage of appendFormattedElement fixed by michael-e.

I’m trying to use the substring-before() function of xPath, yet it won’t fill the field in.

I’ve had a similar problem: format-number(). I believe it’s the quotes that are breaking things.

I believe it’s the quotes that are breaking things.

It’s been a while, but I used single quotes and had problem, I can’t remember whether I changed it for doubles or not. I have no access to the project now to check…

Anyway, it worked when I re-typed it, so maybe I did…

I’m using this extension (which is pretty awesome) to build a fairly lengthy taxonomical string build from a chain of 5 or so categories. Users can select from their options when creating a new product via the super-useful autocomplete query.

By the time someone gets to the last category, though, and they can search for the taxonomical options up to that point, the field is rendered as something like

Electrophoresis and Blotting: Nucleic Acid Electrophoresis and Blotting: Ve…

This automatic shortening has become an unexpected obstacle, as taxonomical chains whose differences are at the end of the string end up looking like duplicate options in the autocomplete results. I’m wondering if there is a way to change at what point these strings are shortened.

Any thoughts?

If it’s over 255 characters, it’s more than likely the database that’s truncating it. It’s most likely set to VARCHAR(255).

You could change it to a higher number I think…

It seems to be maxing out at 75 characters. I’d probably be able to operate with 255. I did a pass through the extensions code but didn’t see anything obvious that dictated this length.

I can’t see anything either, but I also can’t reproduce this.

I’ve just tried it and can’t reproduce your problem, so I don’t know what’s going on there…

So, here’s what I have going on. Think five levels of categories, each as a section. Each level (other than the first) has a drop down that allows you to pick the parent category. Each level has a reflection field that builds the category taxonomy as you descend the tree. That reflection field populates the parent select box for the child category level. By the end of the chain, you have:

Level1: Level2: Level3: Level4: Level5.

Except if the category names are long (which they are in this case) this taxonomy seems to be capped at 75 characters.

Having the full taxonomy would be spectacular, coupled with the autocomplete, since the users (who will be working mostly at Level5) can easily find their appropriate options.

RexUmbrarum: I’ve had a quick look at the code and it doesn’t seem that the field is posing that limit on purpose.

I’ve had another problem of disappearing text: When the field you’re referring to contains quotes " the reflection field in the publish dialog won’t display the text following that quote properly. Can you check that it’s not the same problem?

Could it be that the prepareTableValue is used somewhere, which I think auto-truncates the value. A limit of 75 characters sounds familiar in this context.

Could it be that the prepareTableValue is used somewhere, which I think auto-truncates the value.

Yes, it does. Sounds a bit odd that prepareTableValue truncates the value (preparing doesnt sound like truncating :-)). I’ll take a deeper look.

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