enriquepiatti / Magicento

PHPStorm plugin for Magento developers
115 stars 35 forks source link

[MAGENTO 1] Rewrite classes/controllers/blocks/etc not working properly #300

Open gabriellslvr opened 5 years ago

gabriellslvr commented 5 years ago

The "Rewrite class, controllers, etc" function not working for me...

Using Magento 1.x, PhpStorm 2018.1.1, Magicento 3.0.2.

In non controller files, the file don't create and nothing happens... In controller files, if you choose to extend the default class from file, it not works, nothing happens too. But if you choose to extend the extended class from controller, it works but the new class file is wrong, since it not insert the "require" in rewrited class. The config.xml entries are ok, but the new class file is wrong (in this situation).

gabriellslvr commented 5 years ago

Updating... I reproduced again the error and could get the error log from phpStorm... screen shot 2019-02-07 at 22 46 14

null java.lang.NullPointerException at com.magicento.actions.RewriteControllerAction.executeAction(RewriteControllerAction.java:52) at com.magicento.actions.MagicentoActionAbstract.actionPerformed(MagicentoActionAbstract.java:406) at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:220) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:237) at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep.performAction(PopupFactoryImpl.java:908) at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep.performAction(PopupFactoryImpl.java:898) at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep.a(PopupFactoryImpl.java:892) at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:195) at com.intellij.ui.popup.AbstractPopup.a(AbstractPopup.java:1398) at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:2850) at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:168) at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.java:132) at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:190) at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.doWhenFocusSettlesDown(IdeFocusManagerImpl.java:56) at com.intellij.ui.popup.AbstractPopup.dispose(AbstractPopup.java:1392) at com.intellij.ui.popup.WizardPopup.dispose(WizardPopup.java:160) at com.intellij.ui.popup.list.ListPopupImpl.dispose(ListPopupImpl.java:307) at com.intellij.ui.popup.PopupFactoryImpl$ActionGroupPopup.dispose(PopupFactoryImpl.java:338) at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:48) at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:44) at com.intellij.openapi.util.objectTree.ObjectNode$1.execute(ObjectNode.java:138) at com.intellij.openapi.util.objectTree.ObjectNode$1.execute(ObjectNode.java:107) at com.intellij.openapi.util.objectTree.ObjectTree.executeActionWithRecursiveGuard(ObjectTree.java:169) at com.intellij.openapi.util.objectTree.ObjectNode.execute(ObjectNode.java:107) at com.intellij.openapi.util.objectTree.ObjectTree.executeAll(ObjectTree.java:144) at com.intellij.openapi.util.Disposer.dispose(Disposer.java:129) at com.intellij.openapi.util.Disposer.dispose(Disposer.java:125) at com.intellij.ui.popup.WizardPopup.disposeAllParents(WizardPopup.java:263) at com.intellij.ui.popup.list.ListPopupImpl.handleNextStep(ListPopupImpl.java:442) at com.intellij.ui.popup.list.ListPopupImpl.a(ListPopupImpl.java:396) at com.intellij.ui.popup.list.ListPopupImpl.handleSelect(ListPopupImpl.java:337) at com.intellij.ui.popup.list.ListPopupImpl$1.actionPerformed(ListPopupImpl.java:250) at com.intellij.ui.popup.WizardPopup.a(WizardPopup.java:378) at com.intellij.ui.popup.WizardPopup.dispatch(WizardPopup.java:358) at com.intellij.ui.popup.PopupDispatcher.dispatchKeyEvent(PopupDispatcher.java:126) at com.intellij.ui.popup.PopupDispatcher.dispatch(PopupDispatcher.java:160) at com.intellij.ide.IdePopupManager.dispatch(IdePopupManager.java:87) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:674) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:395) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

enriquepiatti commented 5 years ago

Hi @gabriellslvr, 3.0.2 is an old version, probably that's the reason of the error

gabriellslvr commented 5 years ago

Sorry @enriquepiatti, i got confused and type the wrong information...

I have the last version... Check it:

https://i.imgur.com/zWl9rzC.png

enriquepiatti commented 5 years ago

Hi @gabriellslvr please don't check there, it could show a wrong message, the real version is shown inside "plugins" from PhpStorm settings, search "Magicento" there and let me know

gabriellslvr commented 5 years ago

screen shot 2019-02-27 at 16 21 39

Here is the current version i have installed here.

enriquepiatti commented 5 years ago

Hi @gabriellslvr please show me the info you are using to rewrite the controller (a screeshot of Rewrite Controller dialog).
Also I need to see your project folder structure (for the controller classes and modules involved).
If this is a private information to show here please send me an email