Skip to content

1974 wpml menu fix#2013

Merged
jarednova merged 13 commits intomasterfrom
1974_wpml_menu_fix
Jun 19, 2019
Merged

1974 wpml menu fix#2013
jarednova merged 13 commits intomasterfrom
1974_wpml_menu_fix

Conversation

@jarednova
Copy link
Copy Markdown
Member

Ticket: #1974

Issue

The last WPML language switcher menu item was picking up the prior item's classes

Solution

While we want to use the WP_Post object (as opposed to the Timber-based object) to pull classes from, we need to clear its value to prevent the issue from occurring

Impact

This fixes #1974 (including @mgarabedian related issue). Unlike #2009, this isn't WPML-specific

Usage Changes

None

Testing

I tested locally against a real WPML instance and verified the fix. I don't think new tests are necessary since this removes a bug vs. creating a feature

@jarednova jarednova requested a review from palmiak as a code owner May 30, 2019 14:31
@codecov
Copy link
Copy Markdown

codecov bot commented May 30, 2019

Codecov Report

Merging #2013 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2013      +/-   ##
============================================
+ Coverage     95.01%   95.01%   +<.01%     
  Complexity     1570     1570              
============================================
  Files            49       49              
  Lines          3708     3710       +2     
============================================
+ Hits           3523     3525       +2     
  Misses          185      185
Impacted Files Coverage Δ Complexity Δ
lib/Menu.php 92.12% <100%> (+0.12%) 51 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d761e4...2476136. Read the comment docs.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.003%) to 94.266% when pulling 8b6cea8 on 1974_wpml_menu_fix into 137aa59 on master.

@jarednova jarednova added the Ready for Review Ready for a contrib to take a look at and review/merge label May 30, 2019
@jarednova
Copy link
Copy Markdown
Member Author

This is ready for your review @palmiak !

@jarednova jarednova assigned lggorman and palmiak and unassigned lggorman May 30, 2019
@palmiak
Copy link
Copy Markdown
Collaborator

palmiak commented May 30, 2019

@jarednova do we have some access to latest WPML? I only have some older version from some project.

@jarednova
Copy link
Copy Markdown
Member Author

@palmiak yeah, they gave me a dev copy to test against. I'll email you what I've got

@jarednova jarednova added the 1.x label Jun 4, 2019
@jarednova jarednova merged commit 78e5cd0 into master Jun 19, 2019
@jarednova jarednova deleted the 1974_wpml_menu_fix branch June 19, 2019 00:28
@roberrrt-s
Copy link
Copy Markdown

Hi @jarednova does this commit fix issue #2020 ?

@jarednova
Copy link
Copy Markdown
Member Author

@roberrrt-s #2020 is resolved by a (pending) upgrade to WPML that will synchronize versions of Twig. Once it's released I'll test to verify and then (very loudly) annouce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.x Ready for Review Ready for a contrib to take a look at and review/merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue with Menu in WPML

5 participants