Closed (fixed)
Project:
Context
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jun 2016 at 19:01 UTC
Updated:
20 Nov 2018 at 06:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
chishah92 commentedI simply installed the module , but couldn't replicate the issue . It would be great if you provide steps to replicate in steps.
Comment #3
jlbretton commentedI have the same message after updating context from 7.x-3.6 to 7.x-3.7 and Drupal to 7.43. This happen on my locale development website and on the production one.
The error appears on pages without menu links but with the following context:
Conditions:
- type of node: xxxx
Reactions:
- block: xxxx
- Menu: (Control menu active class using context.)
-- menu 1 (menu not highlighted in context)
--- menu 1.1 (menu highlighted in context)
Except the fact that the concern type of node, which generates this error, doesn't have a menu, the other "special" thing I can think about it is that it has the Date module present and active in it.
Adding a menu to the node type and then to the page, doesn't change the issue.
Many thanks.
Comment #4
hass commentedShould be simple to fix. Will share a patch that checks if isset.
Comment #5
raphaelhuefner commentedPreliminary patch with
isset().Comment #6
hass commentedDoes this work?
Comment #7
jlbretton commentedYes, perfect, patch from #5 works.
Many thanks.
Comment #9
hass commentedComment #11
Andrey Inkin commentedThe patch from raphaelhuefner prevents the active class to be set if no classes were added prior. The following patch fixes the problem.
Comment #12
rsvelko commented+1 for #11: I wrote a PM to @raphaelhuefner.
Comment #13
raphaelhuefner commentedThank you rsvelko for reaching out!
Andrey's solution is better for exactly the reason he described in #11, so please discard my patch from #5.
Comment #14
rsvelko commented@raphaelhuefner, are you going to re-open the issue, undo the patch from #5 and commit the #11 patch in the codebase?
Comment #15
giupenni commented#11 works for me
Comment #16
zrpnr#11 worked for me, thanks raphaelhuefner and andrey
Comment #17
jweakley commentedinstalling 7.x-3.x-dev fixed the "Notice:" errors I was getting
Comment #18
loopduplicate commentedThe patch from #11 works against 7.x-3.6 but not against the current dev release. So, I've created a new issue and rerolled #11, https://www.drupal.org/project/context/issues/2979505#comment-12651518
Comment #19
jamesoakleyAdded a request at #3014980: Warning and notice from line 247, version 2 for this to be reopened so it can be fixed as at #11. Only #5 got committed
Comment #20
jamesoakley