backdrop-contrib / i18n

Collection of modules to extend Backdrop CMS multilingual capabilities
https://backdropcms.org/project/i18n
GNU General Public License v2.0
2 stars 5 forks source link

i18n_taxonomy issues #3

Closed laryn closed 4 years ago

laryn commented 8 years ago

Similarly to #2 -- when visiting admin/structure/taxonomy/tags/configure I get:

Fatal error: Maximum execution time of 30 seconds exceeded in /path/to/backdrop/core/includes/errors.inc on line 57

When visiting admin/structure/taxonomy/tags/translate the page shows up in an identical way to the issue with menus. Clicking a 'translate' link reloads the page sans proper breadcrumb and tabs:

screen shot 2016-11-03 at 11 04 08 pm screen shot 2016-11-03 at 11 05 46 pm

Hopefully the similarities here mean that if we crack it on one it will make the other one easy to solve, too.

laryn commented 7 years ago

Just to update, after the latest commit this timeout bug still exists. But I can now visit admin/structure/taxonomy/tags and view a "Translate" tab, which seems to function at a basic level (as opposed to the 2nd error above).

screen shot 2016-11-09 at 2 29 08 pm
laryn commented 7 years ago

Same as #2 -- a matching error shows up in watchdog if I've got i18n_menu disabled and i18n_taxonomy enabled, and I try to go to the vocabulary's "Configure" page:

Notice: Undefined property: stdClass::$language in i18n_langcode() (line 277 of /Users/user/buildkit/build/backdrop-demo/modules/i18n/i18n.module).

https://github.com/backdrop-contrib/i18n/blob/1.x/i18n.module#L277

indigoxela commented 4 years ago

A new PR is available. Please test. It fixes (should fix) all those errors plus brings basic functionality.

Really, please test.

laryn commented 4 years ago

@indigoxela The main functionality seems to be working well -- amazing! Here are some observations and a few issues I found along the way. Take them for what they are worth at this stage.

  1. Taxonomy > Manage Display shows a blank field (when that vocabulary is set to "Translate."): Screen Shot 2020-04-01 at 2 25 56 PM
  2. Taxonomy > Manage Fields gives an error (when that vocabulary is set to "Translate."):

    Error: Unsupported operand types

  3. An "Undefined" translation set is created at some point: Screen Shot 2020-04-01 at 2 29 33 PM
  4. Not sure if it's related to this module, but on vocabs that do not have multilingual options enabled, the table columns/headers are not matched correctly: Screen Shot 2020-04-01 at 2 33 45 PM
indigoxela commented 4 years ago

@laryn many thanks for testing! Yes, I also observed some odd behavior when switching between types (translate, localize, none...). And I also observed that handling translation sets should get more robust.

I'll have a look at that table header problem, too. (Weekend is coming :wink:)

indigoxela commented 4 years ago

@laryn More commits have been made to my PR, which address point 1 and 2 (many thanks for pulling this out).

And it should be much harder now to create a broken "Undefined" translation set (point 3). It might still be possible, though.

As you already suspected, point 4 is unrelated to i18n. Thats https://github.com/backdrop/backdrop-issues/issues/3869

In case you still see php notices, try to start with a fresh database. The broken translation sets might have created incomplete taxonomy terms that could interfere.

...and report all the remaining issues here. :wink:

laryn commented 4 years ago

Thanks again @indigoxela ! More comments from a walkthrough on a fresh install:

  1. There is no default or requirement on the "Extended" radio buttons after enabling Multilingual on a vocab. Is that supposed to be that way? Screen Shot 2020-04-03 at 12 58 59 PM

  2. I tested "Localize" first and that seemed to be working well. Then I changed configuration to "Translate" and the term I had localized had no translation (I suppose the localized data doesn't transfer automatically) so I added a translation to the term. This seems to work pretty well (1 and 2 in my earlier comment are fixed) however, I see this twice in the log:

Notice: Undefined index: langcode in i18n_taxonomy_form_alter() (line 918 of /app/modules/i18n/i18n_taxonomy/i18n_taxonomy.module).

Also, the "Translation sets" page continues to create/show an "undefined" set: Screen Shot 2020-04-03 at 1 09 37 PM

  1. I was going to test "Fixed language" but I'm not sure what that is supposed to do. It forces me to choose a language in the configuration for that option: Screen Shot 2020-04-03 at 1 11 55 PM

But when I am creating a new term, it still lists all language options: Screen Shot 2020-04-03 at 1 12 54 PM

indigoxela commented 4 years ago

@laryn Thanks again for testing.

Re point 1 - probably this should have a default value...

Re point 2 - nice catch! I didn't realize that php notice, should be fixed now. And to clarify: localize and translate are fundamentally different (different submodules actually).

Re "Undefined" translation sets: can you provide the steps to create one, please?

Re point 3 - fixed language. I took a look at that now, it should be working with the latest commits (the language dropdown in Backdrop is provided by core).

Happy testing again. :wink: