Just performed the automated upgrade to the latest version of 7.x3.4 from 7.x3.3 and the button that i have on ckeditor doesn't appear to do anything when pressed.
I've tried clearing the cache and switching from my default Adminal theme to seven for my admin pages but it didn't make a difference.
I had set it up to work with ckeditor (using wysiwyg) and using a custom text format (not the default full html one).
I'm wondering whether its this fix https://www.drupal.org/node/2115763 thats caused the issue?
I've deleted 7.x3.4 and uploaded via ftp 7.x3.3 and its working fine
no idea whats needed to debug this, but happy to run tests if someone can point me in the right direction
Comment | File | Size | Author |
---|---|---|---|
#23 | linkit_button_doesn_t-2550845-23.patch | 3.36 KB | anon |
#9 | linkit-fields-undefined-2550845-9.patch | 836 bytes | mstrelan |
Comments
Comment #2
Dean Clayton CreditAttribution: Dean Clayton commentedComment #3
tkruger CreditAttribution: tkruger commentedI am getting the same thing.
Comment #4
sdmeyers CreditAttribution: sdmeyers as a volunteer commentedSame issue. Received this error in browser debugging console:
TypeError: Drupal.settings.linkit.fields is undefined
Leads to line 45 of plugin.js (CkEditor):
Drupal.settings.linkit.currentInstance.profile = Drupal.settings.linkit.fields[editor.name].profile;
Downgraded back to 3.3.
Comment #5
anonAre you using features or some other "import" module to handle the profiles?
Comment #6
mstrelan CreditAttribution: mstrelan commentedI am getting this same error, except it only applies to the wysiwyg in paragraphs fields, when the paragraph is not loaded on initial page load, ie. it is loaded via ajax after clicking "edit". The error message I see is "Uncaught TypeError: Cannot read property 'profile' of undefined" which also leads to line 45 of plugin.js.
Comment #7
Dean Clayton CreditAttribution: Dean Clayton commentedfor me I'm not using features or any import modules. I had created the fields already and then uploaded the linkit module and edited the wysiwyg configuration to add the button into the editor.
I have created 2 profiles, though i could probably delete one as its no longer used.
I saw the issue on a basic page with 1 large text field (body).
I'm using the wysiwyg module with ckeditor. I've also noticed that i don't appear to be able to use linkit on create, only edit ( though i'm not sure whether this is related and i've only seen this on pages with multiple wysiwyg fields)
Comment #8
anonI get tons of issues regarding undefined methods calls.
In most cases, this is not because linkit fails, its that something before linkit fails that the bubbles up.
Please see this issue, as it seems to be the root cause for many "undefined" issues.
#2249097: CKeditor dialogue works on one node type, broken on another
I will close this for now. Please feel free to open it again if you can provide more detailed information that helps me reproduce this.
Comment #9
mstrelan CreditAttribution: mstrelan commentedThanks @anon for responding to this. The suggestions in #2249097: CKeditor dialogue works on one node type, broken on another did not help me and my error report in #6 is reproducible. I'm guessing it is to do with something the Paragraphs module is doing, but I noticed that disabling static caching in
linkit_pre_render_editor_element()
fixes this for me.If I add a call to
dpm($element);
I notice that the same element is processed twice by LinkIt with the same id each time. The second time the library and js_settings aren't attached to the element, because it's skipped due to the static caching.While it may be better to fix this in other modules, would it be possible to change the way the static caching works in
linkit_pre_render_editor_element()
? The attached patch will cache the js_settings for an element by its id, but attach the settings to the element regardless of if it's been processed already.@Dean Clayton perhaps you could see if this resolves your issue too?
Comment #10
AmiGator CreditAttribution: AmiGator as a volunteer commentednothing above does not work. error is:
Uncaught TypeError: Cannot read property 'filtered_html' of undefinededitor.addCommand.exec @ /sites/all/modules/linkit/editors/ckeditor/plugin.js?t=F7J9:57exec @ ckeditor.js:182CKEDITOR.tools.extend.execCommand @ ckeditor.js:250CKEDITOR.tools.extend.click @ ckeditor.js:667d.execute @ ckeditor.js:668(anonymous function) @ ckeditor.js:669(anonymous function) @ ckeditor.js:29CKEDITOR.tools.callFunction @ ckeditor.js:29onclick @ edit:1
Comment #11
Dr Jason Guo CreditAttribution: Dr Jason Guo commentedIn response to #6,
This could be the result of lacking a Linkit profile when setting up the Paragraphs field.
Maybe an easier fix is to define and attach a Linkit profile to the Paragraphs field after the field is defined? Please try the following:
Comment #12
mstrelan CreditAttribution: mstrelan commentedWhile I maintain that this was a separate issue, and was not resolvable by increasing max_input_vars, it has since been resolved in 7.x-3.5 by #2249097-31: CKeditor dialogue works on one node type, broken on another.
Comment #13
mstrelan CreditAttribution: mstrelan commentedSorry, I'm opening this back up as I've experienced it again. It's difficult to reproduce but the patch is suitable under "normal" situations so I still believe it should be considered.
Comment #14
mstrelan CreditAttribution: mstrelan commentedComment #15
Ryan Senese CreditAttribution: Ryan Senese commentedI can reproduce this issue, but I'm not sure if it's because of the other module I'm using or not (Page Preview). When the preview iframe is open, the following error is logged into the console when clicking on LinkIt in the WYSIWYG:
Uncaught TypeError: Cannot read property 'filtered_html' of undefined
(Filtered_html being the default text format of my Drupal site)Comment #16
ja09 CreditAttribution: ja09 commentedI can confirm this on a fresh installation using ckeditor 7.x-1.17 and linkit 7.x-3.5. Brand new install and those are the only two additional modules installed.
Console errors:
Uncaught TypeError: Cannot read property 'filtered_html' of undefined
Uncaught TypeError: Cannot read property 'full_html' of undefined
Tried the patch on #13 above, and tried the dev module. No luck with either.
Comment #17
ja09 CreditAttribution: ja09 commentedComment #18
ja09 CreditAttribution: ja09 commentedNevermind, this seems to be a documentation issue more than anything. Didn't realize a Linkit profile had to be configured. Don't remember that being required a couple years ago. Sorry about that.
For simplicity, I think it would be very helpful to update the description that appears on the ckeditor screen...
Change line 1025 of linkit.module to something like this:
Comment #19
anonI can't commit any patches until I have a tested this myself, and from the information given it is not clear how to reproduce.
Also, I suspect that there is not only one other module causing this.
Can we try to do a list of modules?
Comment #20
aken.niels@gmail.comI can confirm that patch in #9 fixes my issues too in previewed Paragraphs.
Comment #21
anonComment #22
james.cartledge CreditAttribution: james.cartledge commentedI can reproduce the issue with Page Preview as described in #15, and confirm the patch at #9 resolves the issue.
Comment #23
anonIt seems like the static cache is causing more trouble then good. Also, the linkit_pre_render_editor_element method is quite "lite" to run.
I suggest removing the static cache.
Tests this patch.
Comment #24
lor CreditAttribution: lor as a volunteer commented#23 not working for me:
patch -p1 --dry-run < ../../patch/linkit_button_doesn_t-2550845-23.patch
patching file linkit.module
Hunk #1 FAILED at 1062.
Linkit Version: 7.x-3.5
#9 is working great.
Thank you for the job!
Comment #25
anonThe test bot can patch it. Run it with the lastes dev.
Comment #26
hondo522 CreditAttribution: hondo522 commentedI'm still seeing the error for max_input_vars. This is causing the the linkit editor to get stuck rendering without any real JS error. We're using the latest dev version of linkit with this patch:
https://www.drupal.org/files/issues/linkit_button_doesn_t-2550845-23.patch
Here's the error:
Comment #27
eelkeblok@hondo522 Is this an issue that is introduced with this patch? It doesn't sound related.
I've had a look at the patch. It might appear that it makes many changes, but all it really does is remove one level of indentation because the check for the static variable is removed, plus two very minor changes (one comment is made to fit in 80 characters, and the sequence of the imce check is made a bit more logical). Also, it seems to actually do what it says on the tin, it fixed this problem we were having with the editor in a paragraph field. RTBC for me. hondo522, please feel free to set it back to needs work if you can clearify a bit more how you find that the problem you have is caused by this.
Comment #29
anonCommitted patch in #23
Comment #31
s427 CreditAttribution: s427 commentedI can confirm that patch #9 did it for me. Thanks!
To clarify, my problem was: on a wysiwyg field (ckeditor) with the paragraph module, and the paragraph field configured to be on "preview" mode by default (when editing the node). When opening the paragraph field to edit its content and using the linkit button, nothing happened and the console output the "Drupal.settings.linkit.formats is undefined" error.
This did not happen if the paragraph field was open by default (instead of preview).
Comment #32
RAWDESK CreditAttribution: RAWDESK commentedOur hosting partner resolved it by increasing the max_input_vars to 5000.
No other option addressed above seemed to be working.
Comment #33
RAWDESK CreditAttribution: RAWDESK commentedApplying patch #23 (by installing 7.x-3.5+25-dev) eventually solved it, since for larger Paragraphs wrapped textarea pages the remedy by increasing the max_input_vars didn't work in all cases.
Any chance this version gets released to 7.x-3.6 one of these days ?