If views taxonomy term page is enabled you'll get this notice:
Notice: Undefined variable: page_language in taxonomy_field_menu_translated_menu_link_alter() (line 1342 of .../taxonomy_field_menu.module).
Here's a patch to solve this issue.
and thanks for your module.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | taxonomy_field_menu-2266583-8.patch | 1.97 KB | anou |
Comments
Comment #1
anouComment #2
anouOups wrong extension... sorry
Comment #3
smiletrl commentedThanks for posting patches for this module, anou!
Generally speaking, we need to change issue status to 'Needs review', so drupal bot will take your patch for review:)
Comment #4
smiletrl commentedThanks anou. This is indeed a bug. This problem comes because the menu callback has been altered for term.
Your patch works well for the views case. But if menu callback for node/%, or taxonomy/term/% has been altered in other way, this problem may still remain.
So my suggestion is, besides your change, maybe we can change this code too.
to
Comment #5
anouAnd another thing about language, it´s better to use 'LANGUAGE_NONE' instead of 'und'.
And next time, I'll change the status ;-)
Thanks for the advice.
Comment #6
anouComment #7
smiletrl commentedGreat, when these parts are finished, I will add you to the maintainer list of this module, so you can commit these changes:)
Comment #8
anouHello,
Here's a patch for all the changes :
And you don't need to make me a maintainer, but I sure be happy if you authored this patch on me :-)
Have a nice shiny day !
Comment #9
smiletrl commentedThanks anou! I have authored you for this patch. This commit message has displayed at your profile now.
There's a small trailing whitespace in this patch though, -- I have removed it. If you want to check this trailing space issue manually, I recommend https://dreditor.org/. After install this editor, you will see the extra space when you review this patch.
Thanks again!
Comment #10
jeff.a commentedCould anyone tell me the status of patch #8? Tried it with 7.x-1.0 and 7.x-1.x-dev with no luck. The errors are still present. Issues applying the patch as well.
I'm getting:
Notice: Undefined variable: page_language in taxonomy_field_menu_translated_menu_link_alter() (line 1341 of ...sites/all/modules/taxonomy_field_menu/taxonomy_field_menu.module).Reverted back to 7.x-1.0-beta1 and the errors are gone. Don't really need language support for now. Thanks.
Comment #11
anouPatch was committed to dev version. See here
Comment #12
jeff.a commentedThat's bizarre. I could have sworn the dev version was still throwing the error after clearing all caches, which is why I tried to patch it. Appears to be working now. Thank you for clearing that up.
Comment #13
lan commentedThanks so much for the module and the patch!
But I have got another notice:
Notice: Undefined property: stdClass::$language in taxonomy_field_menu_translated_menu_link_alter() (line 1330 of modules\taxonomy_field_menu\taxonomy_field_menu.module).
Please help. Thanks.
Comment #14
smiletrl commentedLan, what's your drupal version and where/when do you see this notice?
Comment #15
smiletrl commentedAlso, did you enable views page "taxonomy/term/% view"?
Comment #16
lan commentedThanks for your response smiletrl. I am using drupal 7.32, it s on my taxonomy term views page. actually it happens on the taxonomy/term/% views page.
Comment #17
lan commentedsmiletrl , have you got any idea about this notice yet? Thanks.
Comment #18
smiletrl commentedThanks Lan!
This is actually a bug for drupal 7.32. This latest version has removed language property from term object.
I just committed the fix. Let me know if this issue remains.
Comment #19
lan commentedThanks smiletrl. sorry, how to fix it?
Comment #20
smiletrl commentedDownload dev version of this module. The dev version always has the latest code.
Comment #21
lan commentedI see , thanks :)
Comment #22
lan commentedIt works. thanks so much smiletrl.
Comment #23
smiletrl commentedcool:)