Active
Project:
Uberimage
Version:
6.x-1.3
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Apr 2010 at 05:05 UTC
Updated:
14 Feb 2011 at 23:31 UTC
Jump to comment: Most recent file
Hi
I ran into this error:
Fatal error: Cannot use string offset as an array in /srv/www/vhosts/trilogos.ch/httpdocs/sites/all/modules/aef_image/aef_image.module on line 629
The screen is completely blank.
Any clue how to solve this?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | aef_image.module.zip | 7.99 KB | stefan81 |
Comments
Comment #1
stefan81 commentedOk, I figured the following:
I am using draggable views to order book pages.
After I reorder the book pages, I get this error on pages with aef_image.
The page is either blank on "view", or when clicking "edit".
I the second case, the aef_image is not visible.
I also posted a questions at draggableviews: http://drupal.org/node/776094
Thanks!
Stefan
Comment #2
lipinponmala007 commentedcan you share the code please .when i develop drupal modules i got many times such error. i was just able to solve anyway.
Comment #3
stefan81 commentedHi, Thanks for your reply!
Unfortunately, I am not a coder,
and can't be much of a help...
I attached file "aef_image.module" the following post, as I can't post it here.
But I have somehow the impression that probably the draggableviews module ( http://drupal.org/project/draggableviews ) is altering more data than it should.
Because if I reorder pages with the drupal native book manager, everything works fine.
I am using this view with the draggable views book handler:
Comment #4
stefan81 commented"aef_image.module"
Comment #5
stefan81 commentedHi
I have still no clue what causes this message:
Fatal error: Cannot use string offset as an array in
/sites/all/modules/aef_image/aef_image.module on line 629
Any Ideas?
Comment #6
stefan81 commentedmigth this help?
http://jeffbeeman.com/node/92
Comment #7
ndeschildre commentedHello!
This error I know well, it's pretty generic, and it's basically when you try to use a string as an offset in an array.
E.g.
So here:
It would mean that $infos is a string? Weird.
The output of "print_r($infos)" would be interesting to see, please.
Cheers,
Nicolas
Comment #8
stefan81 commentedthanks for your input!
Unfortunately I have no experience with coding.
Where shall I place "print_r($infos)"?
Comment #9
stefan81 commentedby the way if I delete the whole paragraph,
at least the blank screen goes away and the page loads.
(aef_image is broken though)
Comment #10
stefan81 commentedby deleting the mentioned paragraph,
I still get this error:
Fatal error: Cannot use string offset as an array in /srv/www/vhosts/trilogos.ch/httpdocs/sites/all/modules/aef_image/aef_image.module on line 621
but again, this only happened on pages, I reordered with draggable views (book handler).
Comment #11
stefan81 commentedsorry for nagging.
Any clue what this could be?
Comment #12
lipinponmala007 commentedi couln't produce that error man
ok .can you please chage on line 629
$infos['data']['presets'][$preset_name]['default_values']
to
$infos['data'] in this attachmen tfile?
and check the out put please
and an error will be there. please sent me that error.
and also after the
$infos['data']['presets'][$preset_name]['default_values'] = array(
'x' => round(($preset_orig_image_width - $section_width)/2),
'y' => round(($preset_orig_image_height - $section_height)/2),
'width' => round($section_width),
'height' => round($section_height),
);
print_r(infos);
you will see some thing interesting
Comment #13
stefan81 commentedHi, thanks for your kind help!
My results:
- Damaged page appears again :)
- some strange layout behaviours.
- infosinfosinfos at the top of the page.
- aef images don't show up. Visible in page edit though.
- Error (drupal generated error in red box) at page edit:
Comment #14
lipinponmala007 commentedif the above is to understand the current value of $infos
make the code as older that means the uploaded condition
then for you information
in line 549 the info is declared so
the $item must be an array
and $infos must must be initialized as an array
so after line 547
please insert
$infos=array();
then run the code and see whether the error is still there
Comment #15
lipinponmala007 commentedho ho ho @ comment #12 it was a mistake by me i missed to put the "$sign"
Really sorry for that please for give me
so please change print_r($infos) instead of print_r(infos) and give me the result please
Comment #16
stefan81 commentedhi
It works with the following:
and on line 548 I added
$infos=array();. In context it looks like:Comment #17
stefan81 commentedhmm, still get this
Fatal error: Cannot use string offset as an array in /srv/www/vhosts/trilogos.ch/httpdocs/sites/all/modules/aef_image/aef_image.module on line 630on other pages damaged (after using draggable views)...Comment #18
stefan81 commentedbut the page appears after deleting this: ['data']['presets'][$preset_name]['default_values']
on page edit again error:
by the way: an other info output:
Comment #19
lipinponmala007 commentedhi this means that(coment #18 ) the $infos is appearing correctly as an array. it fetches the informations of the image very correctly.
take back the code as the oldest form.
Now,is your dependency modules are installed correctly? you
please check the image cache settings brother .please send me that also.
check all the dependency module configurations also. i suspect there is a problem with your image cache configaration
i think there is an update for the uber image module http://drupal.org/project/aef_image can you try that ? in that the line 629 is different so please use that .please follow the updating process strictly.
sorry for the repeated asking of data because i couldn't produce that error here. And i wish we can solve the problem
Comment #20
gastonGlobant commentedI'm experiencing this bug currently.
And seems like a module's developer has tried to fix it somehow, by unserializing the "data" array a couple of times. The thing is.. that the "data" array is getting serialized even when it is already serialized, unlimited times, based on something (that I do not yet know).
I've seen the "data" array being serialized like 12 times, and I'm afraid, it gets serialized everytime I save a node (that contains an uberimage field).
I've "Fixed" the issue, just be increasing the amount of times the "data" array gets unserialized (check _aef_image_unserialize_data function and you will see).
Anybody knows where the data array gets serialized, and how to prevent it to get serialized more than once?
Thanks!