Search

phoque: There are no quotation marks being used in the field contents at any point.

nickdunn: prepareTableValue is used. And after further investigation, you were right about that function. On line 315 of /lib/toolkit/class.field it truncates to 75.

What would be the preferred way to work around that? Just edit the function? Or is there a more subtle, crafty approach, perhaps involving cell_truncation_length?

Aaaand…in a stunning display of self-reliance, I added a cell_truncation_length key to the symphony configuration manually, bumped the value up to 300, which overrides the default 75 characters, and now it works beautifully.

I still don’t understand why we’d want to truncate the value, other than to make sure it doesn’t exceed the table cell length.

That’s what it’s for, to make sure the value isn’t too long in tables. If you’re needing to increase it then this suggests prepareTableValue is being used wrongly or in a context when it was not meant to be used. The main use it for Textarea fields so long values are truncated.

The main use it for Textarea fields so long values are truncated.

Really? Because the default-value of 75 doesn’t make much sense for textareas…

It doesn’t make much sense for any field type to be fair. I would only want to truncate fields at a value I specify, like using the character counter fields.

This should be purely for the backend publish table, which is what this method is intended for. If I choose to show a Textarea column in the publish table, and it contains 10,000 words, I’d want it to be truncated! See “Description” below.

truncated description

As I said, if a field is truncating text for the frontend (or any other means) by accessing the prepareTableValue method, then it is being used incorrectly.

Hah!

prepareTableValue means “prepare value coming from the table” and not “prepare value saving to a table”. I get it now. :-D

I think “table” refers to the publish table in the UI itself, rather than a database table. The latest code docs in forthcoming 2.2 say:

Format this field value for display in the administration pages summary tables.

;-)

There is an issue..

I wanted FULL NAME ( per doc example ) in SECTION A, but the ID was all that was displayed in SECTION B, when I brought it in as a SELECT LINK field.. ?

I wanted FULL NAME ( per doc example ) in SECTION A, but the ID was all that was displayed in SECTION B, when I brought it in as a SELECT LINK field..?

In case you were adding the field to a section already containing entries you have to re-save all entries to fill the reflection field with values.

Hmm… I have been playing around a bit.

The reflection field value didn’t get truncated when I was referring to a simple text input field (however strangely enough, the text input field was):

<entry id="1">
    <reflection handle="test-test-test-test-test-1-test-test-test-test-test-2-test-test-test-test-test-3-test-test-test-test-test-4-test-test-test-test-test-5-test-test-test-test-test-6-test-test-test-test-test-7-test-test-test-test-test-8-test-test-test-test-test-9-test-test-te">Test Test Test Test Test 1 Test Test Test Test Test 2 Test Test Test Test Test 3 Test Test Test Test Test 4 Test Test Test Test Test 5 Test Test Test Test Test 6 Test Test Test Test Test 7 Test Test Test Test Test 8 Test Test Test Test Test 9 Test Test Test Test Test 10 Test Test Test Test Test 11 Test Test Test Test Test 12 Test Test Test Test Test 13 Test Test Test Test Test 14 Test Test Test Test Test 15 Test Test Test Test Test 16 Test Test Test Test Test 17 Test Test Test Test Test 18 Test Test Test Test Test 19 Test Test Test Test Test 20</reflection>
    <text handle="test-test-test-test-test-1-test-test-test-test-test-2-test-test-test-test-test-3-test-test-test-test-test-4-test-test-test-test-test-5-test-test-test-test-test-6-test-test-test-test-test-7-test-test-test-test-test-8-test-test-test-test-test-9-test-test-te">Test Test Test Test Test 1 Test Test Test Test Test 2 Test Test Test Test Test 3 Test Test Test Test Test 4 Test Test Test Test Test 5 Test Test Test Test Test 6 Test Test Test Test Test 7 Test Test Test Test Test 8 Test Test Test Test Test 9 Test Test Te</text>
</entry>

Reflection Field updated to version 1.0.10 on 4th of March 2011

Changelog

  • Fixed a sanitisation issue on publish pages.
  • Made compatible with Symphony 2.2.

I'm getting a strange issue adding a reflectionfield to an exisiting Section ('workers').

I tried adding a 'key' Reflection field with: w{entry/@id} which I hoped would add a value of W:id to the key field of an existing entry (upon saving).

However I get a blank page. The error in my PHP error log says:

PHP Fatal error:  Cannot access protected property Entry::$_fields in ..snip..]/site/extensions/reflectionfield/extension.driver.php on line 73

I am using Symphony 2.2 and added the extension as a Git submodule (from https://github.com/rowan-lewis/reflectionfield.git)

I'm constantly getting this error when trying to use the version 1.0.10 on Symphony 2.2

The used table type doesn't support FULLTEXT indexes

An error occurred while attempting to execute the following query

CREATE TABLE IF NOT EXISTS `nlg_entries_data_65` ( `id` INT(11)

UNSIGNED NOT NULL AUTO_INCREMENT, entry_id INT(11) UNSIGNED NOT NULL, handle VARCHAR(255) DEFAULT NULL, value TEXT DEFAULT NULL, value_formatted TEXT DEFAULT NULL, PRIMARY KEY (id), KEY entry_id (entry_id), FULLTEXT KEY value (value), FULLTEXT KEY value_formatted (value_formatted) )

What do I do?

@FabioPittol My guess is that your running MySQL 5.5, which creates InnoDB tables by default. You'll need to change nlg_entries_data_65 to be a MyISAM table.

This should be done by the extension, but it's being a bit slack and just assuming MyISAM is the default.

@davidhund That's a bug in the extension that's just been missed

Reflection Field updated to version 1.0.11 on 11th of April 2011

Changelog

  • Force tables to be created with the MyISAM table engine.

I am having problems putting this field to use in a Symphony 2.2.1 install. I have successfully used it in an older install (2.1.2), but this time around, the field simply shows no value whatsoever. Even if all I enter is static text, nothing is displayed (and "none" is shown as the value in my entry overview). Any ideas?

My Xpath expression: {entry/nachname}, {entry/vorname}

Okay, so even though it's not saving anything yet, I used the Reflection Field as the dynamic value for a select box in another section. When trying to create a new entry in this section, I got the following fatal database error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near WHERE Field = 'value' at line 3
An error occurred while attempting to execute the following query
SHOW COLUMNS FROM sym_entries_data_113 WHERE Field = 'value'

I'm using version 1.0.11 by the way.

Sorry - the last error I reported seems to be a more global problem and not specific to using the Reflection field. I posted the issue in the issue tracker: http://getsymphony.com/discuss/issues/view/631/

I'd still be thankful for any help regarding my missing values though!

Update - the problem disappeared, not sure what it was in the first place, but we got a server update to MySQL 5 which sorted some other issues and made this one vanish as well.

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