Bug #2351
Compatybility issue with LuxuryButton plugin
100%
Description
There is a very nice and useful plugin:
Luxury Button (http://rmplus.pro/en/redmine/plugins/luxury_buttons)
Unfortunetly, there is an issue with your plugin.
On page lu_coordinates at this plugin there is
no included your main wiking.js file, but this code is trying to be executed:
<script type="text/javascript"> //<![CDATA[ var wikiToolbar = new jsToolBar(document.getElementById('lu_button_user_description'));wikiToolbar.setMoreLink('/plugin_assets/wiking/help/en/wiki_syntax.html');wikiToolbar.setHelpLink('/help/en/wiki_syntax.html');wikiToolbar.draw(); //]]> </script>
Effect is that JS stop execution with error and many element below on that site stop working.
It would be great if you can talk with author of LuxuryButton plugin and resolve this issue.
Associated revisions
Checking for setMoreLink() before using it (#2351)
Refactored jsToolBar button code (#2351)
Moved more_link assignment to header (#2351)
History
#1 Updated by Kovalevski Vasil about 10 years ago
Hello. This error ocurred not only for luxury_buttons plugin.
In file “wiking_wiki_helper_patch.rb” you are using function setMoreLink (wikiToolbar.setMoreLink) which defined in “wiking.js”. Good, but for forms without layout and loaded via ajax there is no included this js file. Thats why error ocurred.
You are using inline js in html form, so, then you can use something like this in inline js:
if (!wikiToolbar.setMoreLink) { ..define.. } .. call ..
Or use one more variable like @heads_for_wiki_formatter_included or somesthing else more better.
Regards, team http://rmplus.pro/
#2 Updated by Andriy Lesyuk over 8 years ago
- Status changed from New to Open
- Target version set to 1.1.0
#3 Updated by Andriy Lesyuk almost 7 years ago
- Status changed from Open to Incomplete
- Priority changed from Normal to Minor
- % Done changed from 0 to 50
I did not get, how can I make this work with LuxuryButton, to be honest. I was about to install that plugin and check, but discovered, that its installation procedure is awful and decided not to risk (its source code is not available anyway).
So, I ended up with checking for existence of setMoreLink()
before trying to call it (in r87). This should resolve any other similar conflicts (with any other plugins too). But, this also means, that the More tool button won’t be available in such cases...
As it’s not a full fix of the issue, I’m leaving this bug open for the case, if someone (user(Vasil):skif?) can tell me, how to make it properly work with LuxuryButton.
#4 Updated by Andriy Lesyuk almost 7 years ago
- Target version deleted (
1.1.0)
#5 Updated by Andriy Lesyuk almost 7 years ago
- Due date set to 30 Dec 2017
- Status changed from Incomplete to Closed
- Target version set to 1.1.0
- % Done changed from 50 to 100
I believe, r90 should fix this issue.