0

I extended a class with friendly help of Rakesh after his advice here: Magento 2 (2.0.7) How to edit a a .php file from module-theme for your own theme?

Now after fixing bugs that prevented me from running terminal command setup:upgrade the module if running fine. Unfortunately the original class I wanted to extend, ceased to work now. Regardless of what I put into my topmenu.php, no menu is shown anymore at all. The only change happens when I add an error into it. So at least it is made sure that the script gets attracted.

So now what went wrong? Normally extending a class should mean the original class is unchanged and new functions in the new file are added to it or overwritten when they have the same name. But it seems it does not work this way.

I hope someone knows the answer so I can proceed with it.

Thanks a lot!

0

I'm a noob you see so I only now realized the error message in system.log. I checked before but did not see one. But then: [2016-06-26 20:28:34] main.CRITICAL: Invalid template file: 'html/topmenu.phtml' in module: 'Package_Topmenu' block's name: 'catalog.topnav' [] []

I found it is a mag-bug from https://github.com/magento/magento2/issues/4564

The solution for now is binding my template with the solution. The rest works now finally. :P

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.