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

action links don't work at all #57

Closed
schplurtz opened this issue Dec 10, 2023 · 3 comments
Closed

action links don't work at all #57

schplurtz opened this issue Dec 10, 2023 · 3 comments

Comments

@schplurtz
Copy link

schplurtz commented Dec 10, 2023

Hi,

I just installed mikio template and plugin on a test wiki. Action links in the menus don't work. For example, I cannot log in. Clicking on user menu effectively drops down the menu as shown below, but clicking on "Log in" does nothing. Tested with both firefox and brave. You can see the problem by yourself on my test wiki. This wiki is to be deleted on 20th December 2023.

If I open the "Log in" (or other action) link in another tab, it works. So the link is correct and the wiki responds well to the query. But a standard click does nothing.

image

In the browser console there are two javascript error messages when the page loads. I don't know if it's related. The first one is caused by the use of $ instead of JQuery. Dokumentation states that javascript should not use $ as a shortcut for JQuery. The second error is a consequence of the first.

Uncaught TypeError: $ is undefined
    <anonymous> https://pamarei1zai7phaop.bidule.https443.net/lib/tpl/mikio/assets/mikio-typeahead.js:695
    <anonymous> https://pamarei1zai7phaop.bidule.https443.net/lib/tpl/mikio/assets/mikio-typeahead.js:37
    <anonymous> https://pamarei1zai7phaop.bidule.https443.net/lib/tpl/mikio/assets/mikio-typeahead.js:40
Uncaught TypeError: jQuery(...).typeahead is not a function
    typeahead https://pamarei1zai7phaop.bidule.https443.net/lib/tpl/mikio/assets/mikio.js:681
    ready https://pamarei1zai7phaop.bidule.https443.net/lib/tpl/mikio/assets/mikio.js:26
    <anonymous> https://pamarei1zai7phaop.bidule.https443.net/lib/tpl/mikio/assets/mikio.js:781
    EventListener.handleEvent* https://pamarei1zai7phaop.bidule.https443.net/lib/tpl/mikio/assets/mikio.js:781
@nomadjimbob
Copy link
Owner

Thanks for reporting however I am not seeing this issue on a clean install of Dokuwiki (2023-04-04a Jack) using Firefox 120.0.1, however I can see it failing on your test website.

Can you provide a screenshot of the plugins you have installed and version of Dokuwiki so I can try and replicate the problem?

Attached is a replacement mikio-typeahead.js (an external library used by the template) file with jQuery used in compatibility mode. Hopefully this fixes the problem, but I cannot be certain as I can't get it to fail. You will need to rename the file from mikio-typeahead.txt to mikio-typeahead.js (Github doesn't allow uploads of JS files in comments.

mikio-typeahead.txt

@schplurtz
Copy link
Author

I reinstalled the wiki with mikio template and plugin being the only extensions. Problem persists.

What I had forgotten, is that is uses the current dev snapshot.

With stable DokuWiki, mikio actions work well, the jQuery error does not appear in console.

Sorry. I should have remembered.

@nomadjimbob
Copy link
Owner

The typeahead script is loading before jQuery as jQuery is deferred by DokuWiki since Hogfather. Mikio checks the Dokuwiki version and does the same, however snapshots return a version of 0, so Mikio treats this as before hogfather, doesn't defer script loading and fails.

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

No branches or pull requests

2 participants