joomla-extensions / weblinks

This repo is meant to hold the decoupled com_weblinks component and related code.
GNU General Public License v2.0
45 stars 88 forks source link

[4.0.1] Weblinks editor button fails. #479

Closed ReLater closed 2 years ago

ReLater commented 2 years ago

2 users in german forum reported an issue with TinyMce and editor weblinks button plugin and I can confirm it. (Also JCE editor displays a JS error.)

Post https://forum.joomla.de/thread/14215-com-weblinks-joomla-4-0-2/?postID=98377#post98377 et seq.

Steps to reproduce the issue

Expected result

Actual result

With JCE editor:

Link is inserted in editor text but popup/modal doesnt't close automatically.

Uncaught TypeError: window.parent.jModalClose is not a function (admin-weblinks-modal.min.js:1:475)

With TinyMce

Nothing happens at all. No link in editor text. Modal doesn't close

Uncaught TypeError: window.parent.jInsertEditorText is not a function (admin-weblinks-modal.min.js:1:438)

ReLater commented 2 years ago

Solution:

Minified admin-weblinks-modal.min.js contains outdated code (from Joomla 3).

After minifying admin-weblinks-modal.js newly in Visual Code the button works correctly.

joomdonation commented 2 years ago

Thanks @ReLater . I will take a look at it on tomorrow.

joomdonation commented 2 years ago

Confirmed the issue and solution. If anyone is having this issue, please use this updated package (while waiting for new version). Thanks again for looking at the issue and suggest the solution @ReLater .

pkg-weblinks-4.0.1.zip