Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
ubercart 7.3.5
drupal 7.24
This problem was discovered after a recent upgrade.
I have a product with a number of attributes. If the attribute is only text there is no problem.
However, if the attribute involves a "price" then I get the following error message:
Fatal error: [] operator not supported for strings in /home/mysite/public_html/includes/common.inc on line 2445
Comments
Comment #1
gscerb CreditAttribution: gscerb commentedComment #2
gscerb CreditAttribution: gscerb commentedComment #3
TR CreditAttribution: TR commentedWhat versions did you upgrade from?
Why do you think that message is caused by Ubercart?
Was this a one-time message or do you always see it? What do you have to do / what page do you have to visit / what actions do you have to take to see the message?
What do you mean "the attribute involves a price"
Are you using any contributed ubercart modules? Which ones?
Comment #4
gscerb CreditAttribution: gscerb commentedI upgraded to Drupal 7.24 Ubercart 3.5 remained the same.
This occurred after the Drupal upgrade. I just noticed it when I view a product with an option which has a price.
This occurs any time I try to view a product which has an attribute option with a price value entered. Text attribute options are OK.
For example, I have a shirt product for $20, option 1: color:red, blue, green etc. Option 2: xlarge: $5
One shirt with a color option of red displays fine.
One shirt with an xlarge option of $5 generates the error message.
Contributed modules
Ubercart Stock Validate
Authorize.net 7.x-3.5
Product Power Tools 7.x-1.x-dev
Terms and conditions 7.x-2.x-dev
Ubercart Ajax Administration 7.x-3.5
Variable Price 7.x-1.0
Comment #5
TR CreditAttribution: TR commentedI think it's doubtful that this is a problem with Ubercart core, because no one else has reported it and we have extensive attribute test cases. It's most likely a problem with one of those contributed modules.
I would start by disabling your contributed module - perhaps Variable Price first, because that affects prices ... See if you can reproduce this with just Ubercart core.
Comment #6
gscerb CreditAttribution: gscerb commentedSolved!
the module readmorecontrol 7.x-1.1-rc2 was causing a conflict. Updating to the dev version solved the error.
Thanks for pointing me in the right direction - disabling modules one at a time.
Comment #7
TR CreditAttribution: TR commentedThanks for letting us know what caused the problem.