- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just upgrading our staging website to 2.1.9 and had to manually apply all our core file fixes again manually.
For example some of the filtered navigation broke for us when we upgraded to 2.1.8. We found this fix on github which resolved the issue:
https://github.com/magento/magento2/commit/2c62aa376eeed447e632aedb42085c9d255520df
Now we've upgraded to 2.1.9 which breaks it again and we have to apply the fix manually.
Which would be fine if it was just 1 fix, but we've already got quite a few fixes and I'm sure the problem is only going to get worse with time.
Does anyone have a good way of managing this automatically? Wondered if I could start using dependency injection (editing di.xml and having class that extends core files and just overrides methods we had to update with our fixes).
Have two issues with that though, we may miss out on good changes Magento make in future releases. And also not sure we can do with js fixes such as this one:
https://github.com/magento/magento2/issues/7115
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @ewanm,
I guess this is the answer you're looking for: http://devdocs.magento.com/guides/v2.1/javascript-dev-guide/javascript/custom_js.html#js_replace
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Best approach to fixing core bugs
Hi @ewanm,
How are you applying those fixes? Can you share a little bit more about how you've changed the code?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Best approach to fixing core bugs
I manually changed the core vendor files as required. Which obviously isn't ideal, as whenever there is a new version of Magento that still contains the bugs the changes fixed you have to manually edit them again.
That's why I asked the question really, to see if there is a better solution.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Best approach to fixing core bugs
In Magento 2 you'll find, basically, two ways to override a class:
- Class preference
- Plugins (interceptors)
I guess in this case you could use the #1 to apply your fixes.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Best approach to fixing core bugs
What would you recommend in terms of fixing Javascript bugs?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @ewanm,
I guess this is the answer you're looking for: http://devdocs.magento.com/guides/v2.1/javascript-dev-guide/javascript/custom_js.html#js_replace
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Best approach to fixing core bugs
Thanks. That does look useful
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Best approach to fixing core bugs
We are running 2.1.7 and have issues with filtered navigation, along with many other core issues and functionality that are unstable. With regard to the filtered navigation, does this fix apply to 2.1.7?