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

Javascript routing error #3807

Closed
Portugao opened this issue Sep 11, 2017 · 8 comments
Closed

Javascript routing error #3807

Portugao opened this issue Sep 11, 2017 · 8 comments
Labels
Milestone

Comments

@Portugao
Copy link

Q A
Zikula Version 1.5.x
PHP Version 5.6

Expected behavior

Working with no error.

Actual behavior

If I try in the hook section to assign a module to another I get a javascript routing error:

router.js:9 Uncaught Error: The route "zikula_hook_hook_togglesubscribeareastatus" does not exist.
    at K.f.i (http://zik15/web/bundles/fosjsrouting/js/router.js:9:313)
    at K.f.m (http://zik15/web/bundles/fosjsrouting/js/router.js:10:32)
    at subscriberAreaToggle (http://zik15/web/bundles/zikulahook/js/hookui.js:160:26)
    at bindSubscriberAreaToProviderArea (http://zik15/web/bundles/zikulahook/js/hookui.js:126:9)
    at HTMLDivElement.drop (http://zik15/web/bundles/zikulahook/js/hookui.js:392:17)
    at $.(anonymous function).(anonymous function)._trigger (http://zik15/web/bootstrap-jqueryui/bootstrap-jqueryui.min.js:5:13831)
    at $.(anonymous function).(anonymous function)._drop (http://zik15/web/bootstrap-jqueryui/bootstrap-jqueryui.min.js:5:52836)
    at $.(anonymous function).(anonymous function)._drop (http://zik15/web/bootstrap-jqueryui/bootstrap-jqueryui.min.js:5:6732)
    at $.(anonymous function).(anonymous function).<anonymous> (http://zik15/web/bootstrap-jqueryui/bootstrap-jqueryui.min.js:5:55303)
    at Function.each (http://zik15/web/jquery/jquery.min.js:2:2882)

Steps to reproduce

try to assign the scribite (6.0 dev) ui hook to the pages module.

@craigh
Copy link
Member

craigh commented Sep 11, 2017

delete the web/js folder and see if it works. probably will.

@Portugao
Copy link
Author

Seems to work.

@Portugao
Copy link
Author

So is this a bug? Is deleting the folder web/js a workaround or the correct fix?

@MisterFau
Copy link

+1

@craigh craigh added this to the 1.5.2 milestone Sep 15, 2017
@craigh craigh added the Bug label Sep 15, 2017
@craigh
Copy link
Member

craigh commented Sep 15, 2017

yes it is a bug.

refs #3804 & #3273

the javascript routing file must be regenerated when a module is installed, etc. OR we should not be 'caching' the routing file (which is why deleting it works)

@Guite
Copy link
Member

Guite commented Sep 17, 2017

the javascript routing file must be regenerated when a module is installed, etc.

This should work in theory because the InstallerListener in the routes module reacts on CoreEvents::MODULE_POSTINSTALL, CoreEvents::MODULE_UPGRADE and CoreEvents::MODULE_REMOVE.
https://github.com/zikula/core/blob/1.5/src/system/RoutesModule/Listener/InstallerListener.php

The result of the dumpJsRoutes() calls should be checked for errors though. If the result is not an empty string it should be added to the flash bag to give feedback about what did not work (e.g. missing permissions).

@shefik
Copy link
Contributor

shefik commented Sep 22, 2017

Deleting the file works for me too.

@Guite
Copy link
Member

Guite commented Oct 2, 2017

Closed by 78d9e04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants