No Code Attached Yet
avatar brianteeman
brianteeman
8 Mar 2023

Steps to reproduce the issue

  1. install Joomla in a subdirectory
  2. set codemirror as the default editor
  3. in the codemirror plugin set the kepmap to vim
  4. create a new article

Expected result

textarea using codemirror

Actual result

codemirror fails to load as it cant find the path to the keymap

Additional comments

The problem appears to lie in the js as this code

    if (this.options.keyMapUrl) {
      await import(`${this.host}/${this.options.keyMapUrl}`);
    }

results in
"keyMapUrl":"media\/vendor\/codemirror\/keymap\/vim.min.js"}

instead of
"keyMapUrl":"MYFOLDER\/media\/vendor\/codemirror\/keymap\/vim.min.js"}

@dgrammatiko looks like it might be the same error we have had before but the js makes no sense to me so sorry I cant fix it

avatar brianteeman brianteeman - open - 8 Mar 2023
avatar joomla-cms-bot joomla-cms-bot - change - 8 Mar 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Mar 2023
avatar dgrammatiko
dgrammatiko - comment - 8 Mar 2023

So:

So it's obvious that those paths need the Uri::root() at the start

avatar dgrammatiko
dgrammatiko - comment - 8 Mar 2023
avatar Quy Quy - change - 8 Mar 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-03-08 16:30:31
Closed_By Quy
avatar Quy Quy - close - 8 Mar 2023

Add a Comment

Login with GitHub to post a comment