Skip to content

[FIX] Bootstrap legacy tree state for TinyMCE4 link dialogs.#2294

Open
middleDuckAi wants to merge 1 commit intoevolution-cms:3.5.xfrom
middleDuckAi:middleDuck/evo-2293-tinymce4-tree-bootstrap
Open

[FIX] Bootstrap legacy tree state for TinyMCE4 link dialogs.#2294
middleDuckAi wants to merge 1 commit intoevolution-cms:3.5.xfrom
middleDuckAi:middleDuck/evo-2293-tinymce4-tree-bootstrap

Conversation

@middleDuckAi
Copy link
Copy Markdown
Collaborator

Problem

Legacy tinymce4-for-modx-evo decides whether to define checkModxTreeUpdate at plugin load time.

In current Evolution manager bootstrap, parent.modx already exists early, but parent.modx.tree is created later by modx.js. That leaves the legacy TinyMCE4 modxlink plugin without checkModxTreeUpdate, so clicking Insert/edit link throws an error before the browser can open.

Solution

  • seed a minimal modx.tree bootstrap object in the manager frame before modx.js extends it
  • keep the fix narrow to the legacy compatibility contract already owned by Evolution
  • add a regression test that locks this bootstrap contract in place

Validation

  • php -l manager/views/frame/1.blade.php
  • php -l core/tests/Unit/Manager/FrameLegacyTreeBootstrapTest.php
  • direct PHP contract check for seeded tree / itemToChange / selectedObjectName
  • local pest/phpunit runner was not available in this checkout, so the regression file is included for upstream CI

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

Successfully merging this pull request may close these issues.

2 participants