Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in lua clean script #163

Merged
merged 1 commit into from
Mar 2, 2021

Conversation

nemphys
Copy link
Contributor

@nemphys nemphys commented Feb 27, 2021

I am currently rewriting this in javascript for a Node project I am working on, and I just discovered a bug in the lua script for tag cleaning I committed 8 years ago(!):

since we are pre-processing the tags before passing them to the script, the last line of the script that removes the affected tags from the global tags list effectively does nothing (the tags in this list are not prefixed).

I have updated the script, so that the prefix addition happens inside it and is used for all operations except for the last one.

Better late than never, I suppose :-)

@colinmollenhour
Copy link
Owner

Wow, can't believe that was never noticed! Any idea why the unit tests don't fail?

@boldhedgehog
Copy link

Wow, can't believe that was never noticed! Any idea why the unit tests don't fail?

It only failed during runtime, that's why you can't use LUA for Magento 2: there are string indexes in the array.

@colinmollenhour
Copy link
Owner

Ahh, I see, the SUNION was working but the SREM was not. Thanks for the fix!

@colinmollenhour colinmollenhour merged commit 0b042d2 into colinmollenhour:master Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants