Search

I received an ugly Symphony error in class.xmlelement.php involving strlen() and tracked down an old 2.1.2 bug that indicated the issue might be caused by a duplicate entry_id value.

Sure enough, I found a duplicate in a table storing Textarea field values. Removing the row with the duplicate value got the affected page running again.

Looking at the schema, I'm not sure how this happened:

CREATE TABLE IF NOT EXISTS `sym_entries_data_38` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `entry_id` int(11) unsigned NOT NULL,
  `value` mediumtext COLLATE utf8_unicode_ci,
  `value_formatted` mediumtext COLLATE utf8_unicode_ci,
  PRIMARY KEY (`id`),
  UNIQUE KEY `entry_id` (`entry_id`),
  FULLTEXT KEY `value` (`value`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=75 ;

This happened on Symphony 2.3. Immediately prior to this error, I had deleted an item via a Subsection Manager field in an existing entry and saved that entry.

Stack trace attached. Any ideas? Can I provide any further details that might help a more skillful PHP developer isolate the issue?

Attachments:
2012-11-20 10.26.19 am.png

I remember I posted a bug on a similar issue for Textbox Field. Don't remember exactly where (GitHub Symphony or GitHub Textbox Field). @brendo said some unique key constraint must be set to prevent this issue from happening again.

Don't know what that means :)

I'm not a MySQL expert, but

 UNIQUE KEY `entry_id` (`entry_id`),

would seem to indicate that such a constraint was set. I'm unaware of any way to circumvent this constraint in an insert query. Is it possible that the Textarea field could have done so?

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