When I open the "Add" Form, I receive the following error in the latest version.

Some information:
- We're using semantic_fields since several years without any problems. We have not installed any new modules in these Drupal installations. Only updates to latest versions.
- The error occurs on all of our Drupal installations! Not only this specific page! All of them are German.
- The error oncy occurs in this form and no where else
- Some other modules we use that might be in conflict here (??): custom_tokens, l10n_update

If you need some more information, no problem!

It seems as if the whole Tokens-String is being indexed as translation ("t()") on this page?

PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'source' at row 1: INSERT INTO {locales_source} (location, version, source, context, textgroup) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => /admin/structure/semantic_fields/add [:db_insert_placeholder_1] => 7.21 [:db_insert_placeholder_2] => You could use tokens, like [node:title] and [node:url]

[.......]
Name Token Beschreibung
Aktuelle Seite Token, in Zusammenhang mit der aktuellen Seitenanforderung.
Query string value [current-page:query:?] Der Wert einer speziellen Anfragezeichenkette von der momentanen Seite.
Seitentitel [current-page:page-title] The title of the current page, as processed by the Page Title module.
Seitenzahl [current-page:page-number] Die Seitenzahl der aktuellen Seite beim Anzeigen von ausgelagerten Listen.
Titel [current-page:title] Der Titel der aktuellen Seite.
URL [current-page:url] Die URL der aktuellen Seite.
Absolute URL [current-page:url:absolute] Die absolute URL.
Argumente [current-page:url:args] Die spezifischen Argumente der aktuellen Seite (z.B. ‚arg:1‘ auf der Seite ‚node/1‘ liefert ‚1‘).
Anzahl [current-page:url:args:count] Die Anzahl der Elemente im Array.
Erster [current-page:url:args:first] Das erste Element des Arrays.
Implodiert (zusammengefügt) [current-page:url:args:join:?] Die Werte des Arrays verbunden durch eine benutzerdefinierte Zeichenfolge jeweils zwischen den Werten.
Joined path [current-page:url:args:join-path] The array values each cleaned by Pathauto and then joined with the slash into a string that resembles an URL.
Letzter [current-page:url:args:last] Das letzte Element des Arrays.
Schlüssel [current-page:url:args:keys] Das Array von Schlüssel des Arrays.
Umgekehrt [current-page:url:args:reversed] Das Array umgekehrt.
Wert [current-page:url:args:value:?] Der besondere Wert des Arrays.
Interne URL [current-page:url:unaliased] Die interne URL.
Absolute URL [current-page:url:unaliased:absolute] Die absolute URL.
Argumente [current-page:url:unaliased:args] Die spezifischen Argumente der aktuellen Seite (z.B. ‚arg:1‘ auf der Seite ‚node/1‘ liefert ‚1‘).
Kurze URL [current-page:url:unaliased:brief] Die URL ohne das Protokoll und ohne einen abschließenden Schrägstrich.
Pfad [current-page:url:unaliased:path] Die Pfadkomponente der URL.
Relative URL [current-page:url:unaliased:relative] Der relative URL.
Kurze URL [current-page:url:brief] Die URL ohne das Protokoll und ohne einen abschließenden Schrägstrich.
Pfad [current-page:url:path] Die Pfadkomponente der URL.
Relative URL [current-page:url:relative] Der relative URL.
Aktueller Benutzer Token mit Bezug zum momentan angemeldeten Benutzer.
Benutzer-ID [current-user:uid] Die eindeutige ID des Benutzerkontos.
E-Mail [current-user:mail] Die E-Mail-Adresse des Benutzerkontos.
Einmalige Anmelde-URL [current-user:one-time-login-url] Der URL der einmaligen Anmeldeseite für das Benutzerkonto.
Erstellt am [current-user:created] Das Datum wann das Benutzerkonto erstellt wurde.
Benutzerdefiniertes Format [current-user:created:custom:?] Ein Datum in einem benutzerdefinierten Format. Details enthält die PHP-Dokumentation.
Kurzes Format [current-user:created:short] Ein Datum im ‚kurzen‘ Format. (18.03.2013 - 19:30)
Langes Format [current-user:created:long] Ein Datum im ‚langen‘ Format. (Montag, 18. März 2013 - 19:30)
Mittleres Format [current-user:created:medium] Ein Datum im ‚mittleren‘ Format. (18. März 2013 - 19:30)
Vergangene Zeit [current-user:created:since] Ein Datum im Format 'time-since'. (43 Jahre 2 Monate)
direkter Zeitstempel [current-user:created:raw] Ein Datum im UNIX Zeitstempel Format (1363631416)
IDs von Benutzerrollen [current-user:role-ids] The role ids the user account is a member of as comma separated list.
IP-Adresse [current-user:ip-address] The IP address of the current user.
Letzte Anmeldung [current-user:last-login] Das Datum wann der Benutzer sich zuletzt an der Website angemeldet hat.
Letzter Zugriff [current-user:last-access] The date the user last accessed the site.
Benutzerdefiniertes Format [current-user:last-access:custom:?] Ein Datum in einem benutzerdefinierten Format. Details enthält die PHP-Dokumentation.
Kurzes Format [current-user:last-access:short] Ein Datum im ‚kurzen‘ Format. (18.03.2013 - 19:30)
Langes Format [current-user:last-access:long] Ein Datum im ‚langen‘ Format. (Montag, 18. März 2013 - 19:30)
Mittleres Format [current-user:last-access:medium] Ein Datum im ‚mittleren‘ Format. (18. März 2013 - 19:30)
Vergangene Zeit [current-user:last-access:since] Ein Datum im Format 'time-since'. (43 Jahre 2 Monate)
direkter Zeitstempel [current-user:last-access:raw] Ein Datum im UNIX Zeitstempel Format (1363631416)
Name [current-user:name] Der Anmeldenname des Benutzerkontos.
Namen von Benutzerrollen [current-user:role-names] The role names the user account is a member of as comma separated list.
Original benutzer [current-user:original] The original benutzer data if the benutzer is being updated or saved.
Benutzer-ID [current-user:original:uid] Die eindeutige ID des Benutzerkontos.
E-Mail [current-user:original:mail] Die E-Mail-Adresse des Benutzerkontos.
Einmalige Anmelde-URL [current-user:original:one-time-login-url] Der URL der einmaligen Anmeldeseite für das Benutzerkonto.
Erstellt am [current-user:original:created] Das Datum wann das Benutzerkonto erstellt wurde.
Benutzerdefiniertes Format [current-user:original:created:custom:?] Ein Datum in einem benutzerdefinierten Format. Details enthält die PHP-Dokumentation.
Kurzes Format [current-user:original:created:short] Ein Datum im ‚kurzen‘ Format. (18.03.2013 - 19:30)
Langes Format [current-user:original:created:long] Ein Datum im ‚langen‘ Format. (Montag, 18. März 2013 - 19:30)
Mittleres Format [current-user:original:created:medium] Ein Datum im ‚mittleren‘ Format. (18. März 2013 - 19:30)
Vergangene Zeit [current-user:original:created:since] Ein Datum im Format 'time-since'. (43 Jahre 2 Monate)
direkter Zeitstempel [current-user:original:created:raw] Ein Datum im UNIX Zeitstempel Format (1363631416)
IDs von Benutzerrollen [current-user:original:role-ids] The role ids the user account is a member of as comma separated list.
Letzte Anmeldung [current-user:original:last-login] Das Datum wann der Benutzer sich zuletzt an der Website angemeldet hat.
Letzter Zugriff [current-user:original:last-access] The date the user last accessed the site.
Benutzerdefiniertes Format [current-user:original:last-access:custom:?] Ein Datum in einem benutzerdefinierten Format. Details enthält die PHP-Dokumentation.
Kurzes Format [current-user:original:last-access:short] Ein Datum im ‚kurzen‘ Format. (18.03.2013 - 19:30)
Langes Format [current-user:original:last-access:long] Ein Datum im ‚langen‘ Format. (Montag, 18. März 2013 - 19:30)
Mittleres Format [current-user:original:last-access:medium] Ein Datum im ‚mittleren‘ Format. (18. März 2013 - 19:30)
Vergangene Zeit [current-user:original:last-access:since] Ein Datum im Format 'time-since'. (43 Jahre 2 Monate)
direkter Zeitstempel [current-user:original:last-access:raw] Ein Datum im UNIX Zeitstempel Format (1363631416)
Name [current-user:original:name] Der Anmeldenname des Benutzerkontos.
Namen von Benutzerrollen [current-user:original:role-names] The role names the user account is a member of as comma separated list.
Rollen [current-user:original:roles] Die Benutzerrollen des Benutzers.
Anzahl [current-user:original:roles:count] Die Anzahl der Elemente im Array.
Erster [current-user:original:roles:first] Das erste Element des Arrays.
Implodiert (zusammengefügt) [current-user:original:roles:join:?] Die Werte des Arrays verbunden durch eine benutzerdefinierte Zeichenfolge jeweils zwischen den Werten.
Joined path [current-user:original:roles:join-path] The array values each cleaned by Pathauto and then joined with the slash into a string that resembles an URL.
Letzter [current-user:original:roles:last] Das letzte Element des Arrays.
Schlüssel [current-user:original:roles:keys] Das Array von Schlüssel des Arrays.
Umgekehrt [current-user:original:roles:reversed] Das Array umgekehrt.
Wert [current-user:original:roles:value:?] Der besondere Wert des Arrays.
Standard-Theme [current-user:original:theme] The user's default theme.
Status [current-user:original:status] Whether the user is active or blocked.
URL [current-user:original:url] Die URL der Benutzerprofilseite.
Absolute URL [current-user:original:url:absolute] Die absolute URL.
Argumente [current-user:original:url:args] Die spezifischen Argumente der aktuellen Seite (z.B. ‚arg:1‘ auf der Seite ‚node/1‘ liefert ‚1‘).
Interne URL [current-user:original:url:unaliased] Die interne URL.
Kurze URL [current-user:original:url:brief] Die URL ohne das Protokoll und ohne einen abschließenden Schrägstrich.
Pfad [current-user:original:url:path] Die Pfadkomponente der URL.
Relative URL [current-user:original:url:relative] Der relative URL.
URL bearbeiten [current-user:original:edit-url] Die URL der Benutzerprofilseite.
URL zum Löschen des Benutzerkontos [current-user:original:cancel-url] Die URL der Bestätigung für das Löschen eines Benutzerkontos.
Rollen [current-user:roles] Die Benutzerrollen des Benutzers.
Anzahl [current-user:roles:count] Die Anzahl der Elemente im Array.
Erster [current-user:roles:first] Das erste Element des Arrays.
Implodiert (zusammengefügt) [current-user:roles:join:?] Die Werte des Arrays verbunden durch eine benutzerdefinierte Zeichenfolge jeweils zwischen den Werten.
Joined path [current-user:roles:join-path] The array values each cleaned by Pathauto and then joined with the slash into a string that resembles an URL.
Letzter [current-user:roles:last] Das letzte Element des Arrays.
Schlüssel [current-user:roles:keys] Das Array von Schlüssel des Arrays.
Anzahl [current-user:roles:keys:count] Die Anzahl der Elemente im Array.
Erster [current-user:roles:keys:first] Das erste Element des Arrays.
Implodiert (zusammengefügt) [current-user:roles:keys:join:?] Die Werte des Arrays verbunden durch eine benutzerdefinierte Zeichenfolge jeweils zwischen den Werten.
Joined path [current-user:roles:keys:join-path] The array values each cleaned by Pathauto and then joined with the slash into a string that resembles an URL.
Letzter [current-user:roles:keys:last] Das letzte Element des Arrays.
Umgekehrt [current-user:roles:keys:reversed] Das Array umgekehrt.
Wert [current-user:roles:keys:value:?] Der besondere Wert des Arrays.
Umgekehrt [current-user:roles:reversed] Das Array umgekehrt.
Anzahl [current-user:roles:reversed:count] Die Anzahl der Elemente im Array.
Updating Employee Email [webks_update:updater_email] The E-Mail Adress of the employee who runs the update.

[:db_insert_placeholder_3] => [:db_insert_placeholder_4] => default ) in locale() (Zeile 713 von xxx/modules/locale/locale.module).

Comments

anybody’s picture

Issue summary: View changes

Shortened Table from error message

anybody’s picture

Status: Active » Needs review

I've found the reason!
The problem is, that the token_tree is contained within a t(), which is not correct: http://drupal.org/documentation/modules/token/update/6/7

You can find the code in line 326 of "semantic_fields_ctools_export_ui.inc":
Old:

if (module_exists('token') == TRUE) {
    $form['semantic_field_settings']['tokens_fieldset']['info'] = array(
      '#markup' => t('You could use tokens, like
        <em>[node:title]</em> and <em>[node:url]</em>' .
           theme('token_tree', array(
          'token_types' => 'all', 
          'click_insert' => FALSE, 
          'show_restricted' => TRUE))),
    );
  }

Correction proposed:

if (module_exists('token') == TRUE) {
    $form['semantic_field_settings']['tokens_fieldset']['info'] = array(
      '#markup' => t('You could use tokens, like
        <em>[node:title]</em> and <em>[node:url]</em> !token_tree'), array('!token_tree' => theme('token_tree', array(
          'token_types' => 'all', 
          'click_insert' => FALSE, 
          'show_restricted' => TRUE)))
           ),
    );
  }

I've tested this in my case and it now works!
If you agree, we should create a patch soon!

anybody’s picture

StatusFileSize
new16.62 KB

Corrected file attached.

misc’s picture

Version: 7.x-1.1-beta1 » 7.x-1.x-dev
Status: Needs review » Fixed

Thanks, good finding, committed to latest dev.

misc’s picture

StatusFileSize
new943 bytes

Patch for beta1 attached.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

fasdalf@fasdalf.ru’s picture

Status: Closed (fixed) » Needs work

There is an error in DEV. It causes errors in admin interface #1980374: PHP error on admin/structure/semantic_fields/list/ordered_list/edit
Comments #2 and #4 have working solutions. This must be a mistype.

Wrong is in bold.

if (module_exists('token') == TRUE) {
$form['semantic_field_settings']['tokens_fieldset']['info'] = array(
'#markup' => t('You could use tokens, like
[node:title] and [node:url] !token_tree'), array(
'!token_tree' => theme('token_tree', array(
'token_types' => 'all',
'click_insert' => FALSE,
'show_restricted' => TRUE))),
);
} else {

Should be:

if (module_exists('token') == TRUE) {
$form['semantic_field_settings']['tokens_fieldset']['info'] = array(
'#markup' => t('You could use tokens, like
[node:title] and [node:url] !token_tree', array(
'!token_tree' => theme('token_tree', array(
'token_types' => 'all',
'click_insert' => FALSE,
'show_restricted' => TRUE)))),
);
} else {

danny englander’s picture

The fix for the syntax error in #6 is valid, without it, I was getting a WSOD on /admin/structure/semantic_fields/add, even with the latest dev.

danny englander’s picture

After going around with this a bit, I am still getting the error, patched or not patched. Only if I remove lines 326 to lines 339 in semantic_fields_ctools_export_ui.inc does the error and WSOD go away. I've spent several hours on this so for now I need to move on.

fugazi’s picture

same problem WSOD

Dret’s picture

I tryed the Dev version to solve the problem...

.. but now a new error appear:

Fatal error: Unsupported operand types in /var/wwwroot/s/includes/form.inc on line 1759

Help!
Please!

sutharsan’s picture

Priority: Major » Critical
StatusFileSize
new1.12 KB

New patch based on all the previous attempts.
Increasing priority to Critical. Without fixing this issue, the module is useless (or at least to new users).

sutharsan’s picture

Status: Needs work » Needs review
sutharsan’s picture

jasom’s picture

#11 seems working

kingfisher64’s picture

Thank you for patch in #11 Sutharsan it stops the WSOD. This needs to be committed asap.

robertom’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for patch #11. It seems to work like a charm.

anybody’s picture

I've contacted the module maintainer and hope that he will have a look at this :)

anybody’s picture

Issue summary: View changes

Some more precision.

misc’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Sorry for late reaction. Committed to latest dev. Thanks for the work!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.