Since there has been changes, I have no doubt better to install on a fresh site without a pre-existing version of Localizer. Anyway I tried but encountered problems, as follows:

INSTALL (UPDATE) ERROR:
I removed the Localizer v1.7 folder, replaced with v2 snapshot folder. Immediately went to update.php, reloaded page to confirm localizer taxonomy module, proceeded and received following errors:
warning: array_merge() [function.array-merge]: Argument #2 is not an array in W:\www\testsite\update.php on line 309.
warning: Invalid argument supplied for foreach() in W:\www\testsite\update.php on line 540.

The whole site is then subject to the following error:
Fatal error: Call to undefined function taxonomy_get_vocabularies() in W:\www\testsite\modules\_contrib\tagadelic\tagadelic.module on line 46

I delete the tagadelic module folder this error disappears. Reinstall tagadelic - problem recurs. Tagadelic deleted for the moment. [Same thing happens even if tagadelic is removed pre-update]

Given that errors have already occurred during update, there seems little point continuing however I had a poke around to see what's what and came across:

TRANSLATE ERROR:
I then moved to try translations on both new and existing nodes and vocabularies - and received the following errors:
warning: array_merge() [function.array-merge]: Argument #1 is not an array in W:\www\testsite\includes\menu.inc on line 415.
warning: Missing argument 1 for localizer_set_adminlocale() in W:\www\testsite\modules\_contrib\localizer\localizer.module on line 478.

ALSO:
I am also getting these errors when trying to enable the Localizer Variable module:
Fatal error: Cannot redeclare taxonomy_term_path() (previously declared in W:\www\testsite\modules\_contrib\localizer\system\taxonomy\taxonomy_localizer.module:61) in W:\www\testsite\modules\taxonomy\taxonomy.module on line 67

and then..when I reload the modules page:
Taxonomy (Core) has been disabled. Click here or hit 'reload' to switch to Taxonomy (Localizer).

I will endeavour to try on a fresh install as clearly this is better. Just offering my two bits..

CommentFileSizeAuthor
#5 localizer.module_2.patch2.47 KBsun
#2 localizer.module_1.patch1.46 KBsun

Comments

sun’s picture

First of all, thanks for testing and responding with detailed information.

We didn't test the new version for 3rd party module support and compatibility yet. Tagadelic module support is the topic of this issue.

My immediate conclusion is that Localizer should work if no other module depends on (core) taxonomy module.

Regarding the other errors I'll need some time for debugging.

sun’s picture

Component: Miscellaneous » Code
Assigned: Unassigned » sun
Status: Active » Needs review
StatusFileSize
new1.46 KB

To split up things a bit more, we'll move the issue Fatal error: Cannot redeclare taxonomy_term_path() to this issue.

I've just committed a fix for the error message you were encountering after running update.php. However, the schema update causing this error isn't required for proper functionality of Localizer.

AFAIS, what remains here is the section titled 'Translate error'. Attached patch tries to fix this.

Roberto Gerola’s picture

I think that the problem is in the definition or the menu items.
It should be : array(arg(1)) in callback parameters.

bobdalob’s picture

I have just tried today's snapshot (14th). Again upgrade from v1.7, tagadelic disabled.

The update.php was trouble-free however an observation that enabling the taxonomy_localizer core module by reload does not check the corrseponding box down in core modules. Categories disappeared in the Admin page but going back to Modules and checking the box, a couple of refreshes and it comes good in a roundabout way - a wee glitch but alright in the end!

At a glance node translations are working for me (there is no translation block for this, right?)

Existing menu/taxonomy translations appear correctly but efforts to edit or create new translations bring up the following error and prevent edits/creates.
warning: array_merge() [function.array-merge]: Argument #1 is not an array in ..\includes\menu.inc on line 415.
warning: Missing argument 1 for localizer_set_adminlocale() in ..modules\_contrib\localizer\localizer.module on line 478.

I figured that localizer.module_1.patch was not in the latest snapshot so have applied this. Good news, at first glance that works but I seem to get stuck in a language that is not my interface language - i.e. I cannot get back to english (when 'Hide current language' is selected in translation options). Easy enough, uncheck that button. I think that should be the default

This is not a conclusive test - just saw the snapshot and patch and wanted to come back to you guys quickly as you seem to be moving.

Looking good!

sun’s picture

StatusFileSize
new2.47 KB

@dougalzene: You're absolutely right - allowing to hide the active language for the translation language block is completely wrong. Please test attached patch.

sun’s picture

Title: Errors on upgrade from v1.7 to v2 snapshot » switchuilocale and switchadminlocale errors
bobdalob’s picture

Patch 2 applied.
Now, regardless of the setting for 'hide current language', in the translation options, the main language shows in translations and so all is well there. Could you not just remove that option from the localizer settings? I cannot see why anyone would wish to hide the current language here - the option may be confusing and the effect would only cripple functionality. Anyway just a thought - importantly, it works.

  • Menus, nodes, taxonomy - now working for me.
  • Site info - not working. It won't switch to allow me to create a translation.
  • Blocks - seem to translate and are now filtered by interface language - superb. Perhaps not as reassuring as the url does not change. Once you know that's ok, well, it's ok!
  • User profile - no translations. Translation language block appears. When switched to 2nd language, the reduced form is shown (which suggests it is ready to take your translation) however any/latest saved text appears in both languages. Test text was entered in the "User registration guidelines:"
  • Search - no - the fatal error below. Search module must depend on core taxonomy module so is subject to the same issue as you raise in 136066 so is best left disabled. Note - it was disabled prior to upgrade and I assume if it was enabled, there would be install error.
    Fatal error: Cannot redeclare taxonomy_term_path() (previously declared
    in ..\modules\_contrib\localizer\system\taxonomy\taxonomy_localizer.module:61)
    in ..\modules\taxonomy\taxonomy.module on line 67

    What else should I be looking out for?

  • sun’s picture

    Is the translation language block appearing? This block is new in Localizer v2 and replaces the old language selection within the form. You'll find the block in admin/build/block. It only appears if you are in a translatable form. If it does not appear, you have to set its region to and back to 'right' (or whereever you want to display the translation language selection) afterwards.

    sun’s picture

    damn. Of course you have to set it to region <none> (disable it), save, and then set it to 'right'.

    bobdalob’s picture

    yes, on install and by default the block is correctly configured to appear. It appears correctly when in translation mode and serves it's purpose to switch between languagues, as mentioned above (menus, nodes, taxonomy, blocks). In "site info" and "user profile" it appears but the translation does not function correctly.

    sun’s picture

    Status: Needs review » Fixed

    ok, seems like the first issue has been fixed then. Committed. Thanks so far.

    Regarding site info and user profile we need to debug a bit more. Thus, I'm moving this discussion to http://drupal.org/node/136313

    bobdalob’s picture

    Just a thought on the translate language block..

    For users, it may not always be clear which language they're in or on - it terms of creating a node. There is no longer anything to confirm this (theme depending, but it is not absolutely clear) except to hit the language again. A site with several languages may also enlarge the block?

    I thought that the combo/drop-down list was a good way to represent and handle the node language. It was clear to the user which language they were in, and it is concise. If that could be placed in the translation block, it would not shift other blocks out of view and it would clearly show the selected language. Probably best set to update on change.

    ..just a thought

    Anonymous’s picture

    Status: Fixed » Closed (fixed)