I'm not sure if this is a Linkit issue or D8 Editor File upload, but the Linkit dialog appears within the Add File dialog. This creates some confusion for users as they see two options.

For reference, the Add File dialog does not appear in the Link dialog.

Linkit dialog in Add File dialog

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MrPeanut created an issue. See original summary.

oksana-c’s picture

Project: Editor File upload » Linkit
Version: 8.x-1.x-dev » 8.x-5.x-dev
Issue summary: View changes

Moving this bug here. Linkit linkit_ckeditor_plugin_info_alter function should be checking the form ID. Patch coming soon.

oksana-c’s picture

Title: Linkit dialog appears in Add File dialog » Linkit dialog appears in Add File dialog generated by D8 Editor File upload module
oksana-c’s picture

Status: Active » Needs review
FileSize
9.41 KB
MrPeanut’s picture

Patch from #4 applies cleanly and works great!

anon’s picture

Status: Needs review » Needs work

There is something wrong with the patch in #4. The indentation seems to be messed up.
My bad, the indentation is correct.

I don't really like the idea of having the whole method in a statement (the first if).

What we should do is to check if ($form_id !== 'editor_link_dialog') then return the from as it is or just return. I think that is cleaner. Any thoughts on that?

oksana-c’s picture

Status: Needs work » Needs review
FileSize
890 bytes

@anon, I absolutely agree on the suggested approach. Refactored patch attached.

  • anon committed c5d18d2 on 8.x-5.x authored by oksana-c
    Issue #2833739 by oksana-c, anon: Linkit dialog appears in Add File...
anon’s picture

Status: Needs review » Fixed

@oksana-c: Thanks for the patch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.