Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#7 | linkit-check-form-id-2833739-7.patch | 890 bytes | oksana-c |
#4 | linkit-check-form-id-2833739-4.patch | 9.41 KB | oksana-c |
Add-File-Linkit.PNG | 10.61 KB | MrPeanut |
Comments
Comment #2
oksana-c CreditAttribution: oksana-c at Savas Labs commentedMoving this bug here. Linkit
linkit_ckeditor_plugin_info_alter
function should be checking the form ID. Patch coming soon.Comment #3
oksana-c CreditAttribution: oksana-c at Savas Labs commentedComment #4
oksana-c CreditAttribution: oksana-c at Savas Labs commentedComment #5
MrPeanut CreditAttribution: MrPeanut commentedPatch from #4 applies cleanly and works great!
Comment #6
anonThere 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?Comment #7
oksana-c CreditAttribution: oksana-c at Savas Labs commented@anon, I absolutely agree on the suggested approach. Refactored patch attached.
Comment #9
anon@oksana-c: Thanks for the patch.