creativeorange / craft-article

Edit richt text content in Craft CMS using Article by Imperavi.
Other
7 stars 3 forks source link

JavaScript errors in Craft CMS CP when Article Editor plugin is enabled #28

Open robinsm opened 3 months ago

robinsm commented 3 months ago

Description: When the Article Editor plugin is enabled, navigating between tabs in the Control Panel (CP) becomes impossible (in some entries but not all) due to JavaScript errors. Disabling the Article Editor plugin resolves the issue, indicating a potential conflict or bug within the plugin itself.

Steps to Reproduce:

Expected Behavior: The CP Tab navigation should work seamlessly without any errors, allowing users to edit and manage entries as needed.

Actual Behavior: The console logs a JavaScript error related to a TypeError: Cannot read properties of undefined (reading '$tabContainer'), preventing tab navigation. This error seems to originate from the plugin's JavaScript files.

Console Errors:

jQuery.Deferred exception: Cannot read properties of undefined (reading '$tabContainer') TypeError: Cannot read properties of undefined (reading '$tabContainer')

Uncaught TypeError: Cannot read properties of undefined (reading '$tabContainer')
    at s.constructor.init (ElementEditor.js:94:44)
    at s.constructor.constructor (Base.js:20:15)

Environment: Craft CMS version: 4.8.3 (and 4.8.6) Article Editor Plugin version: 3.1.0

Edsardio commented 2 months ago

Hi @robinsm

I seem to be unable to reproduce the issue. Are you able to create a repository I can clone to reproduce the issue?

krisMoca commented 1 month ago

Hey I'm getting the same issue. Craft CMS Solo version: 4.9.6 Article Editor Plugin version: 3.1.0

image

MatthewBUK commented 3 days ago

Hi @Edsardio ,

I seem to be getting the same issue after upgrading to latest version of Craft 4. Screenshot 2024-07-18 at 09 14 17

[Update] I rolled back all my updated to Craft and Article Editor back to 2.0.1 and 4.5.5 then ran just the Craft updates and its working as expected. I have noted by reverting EditorAssets.php back to use yii\web\JqueryAsset; and

$this->depends = [ JqueryAsset::class, ]; Its working again. Might need to relook at this issue in Craft 4 and then again in Craft 5.

This fix works for Craft 5.2.8