Closed (fixed)
Project:
Localizer
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Apr 2007 at 02:20 UTC
Updated:
28 Dec 2009 at 22:56 UTC
When trying to translate a node by clicking the "translate" link
I get this error:
****
Fatal error: Cannot use object of type stdClass as array in /modules/localizer/localizer.module on line 1215
****
what is strange, is that it works on a cloned site with the exact same modules installed and a carbon copy of the database
Comments
Comment #1
Roberto Gerola commentedWhich version are you using ?
Row # 1215 in dev version has nothing to do with node translation.
Comment #2
Styles commentedversion = "5.x-2.8"
line 1215: if ($item['#type'] == 'fieldset') {
Comment #3
Roberto Gerola commentedPlease, update to the latest 1.x development version :
http://ftp.osuosl.org/pub/drupal/files/projects/localizer-5.x-1.x-dev.ta...
Comment #4
Styles commentedUpgraded...
Good job making your code more php5 compatible
There is still one Hick: Instead of switching from one language to another, it creates seperate nodes that
publish at the same time
For example, when creating a "Page" with "Publish to Frontpage" and then creating the translation, the result is that both show up on the frontpage
Comment #5
Styles commentedAnother problem with this new dev version is that "field group" titles dont get translated...
Comment #6
Styles commentedWhat about supplying me with the code to fix line 1215, since that version worked better other then the fact that it wasn't working well with php5 ???
Comment #7
Roberto Gerola commented> Another problem with this new dev version is that "field group" titles dont get translated...
Please, this doesn't seem to be a critical bug, only a feature request.
>What about supplying me with the code to fix line 1215, since that version worked
>better other then the fact that it wasn't working well with php5 ???
If you have encountered some problems, open the issues here and I'll see what
is necessary to fix the problems.
Comment #8
Roberto Gerola commentedComment #9
Styles commented>>Please, this doesn't seem to be a critical bug, only a feature request.
It is a critical bug, when a feature works on a release, then doesn't work anymore on a newer released... it becomes a bug.
>>If you have encountered some problems, open the issues here and I'll see what
is necessary to fix the problems.
This is the original issue... line 1215 error of localizer.module.
after research, I found out that its a compatibility problem with php 5 and above.
here is a quote from a similar problem on another site
Comment #10
Roberto Gerola commented> It is a critical bug, when a feature works on a release, then doesn't work
> anymore on a newer released... it becomes a bug.
I've checked the code.
All fieldset titles in localizer options are all using t() function and are fully translatable
through the locale core module (strings translation).
Descriptions are missing the use of t() function and this morning this little issue
has been solved and update committed to cvs.
>This is the original issue... line 1215 error of localizer.module.
Dev version refers to dev version extracted automatically by Drupal.org system
from cvs and not to the particular version you are using on your pc.
If there were changes in the past day on cvs, a new archive is built
automatically.
At now, the dev version for branch 1, at line 1215 has nothing to do with node translation
I've just download the dev 1.x package and at row 1215 there is : return $lang[0];
If you have different instructions, you are not using the current dev version.
Comment #11
Styles commentedOk... but I do have good new for a quick fix of the error:
Fatal error: Cannot use object of type stdClass as array in /modules/localizer/localizer.module on line 1215
on // $Id: localizer.module,v 1.2.2.50 2007/04/04 23:19:57 sun Exp $ version
Goto Line 1215
Change:
if ($item['#type'] == 'fieldset') {
to:
if ($item->type == 'fieldset') {
Abd TADA... it works
Comment #12
(not verified) commented