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.
Thanks for the great module,
but it doesn't seem to work :/
When I run Content Optimiser for body, it says that I have 4 words, while I really have 300+
I have a standard body field and TinyMCE is used as a standard WYSIWYG. So I usually have a lot of HTML in my pages (paragraphs, images with alt and image title text etc). Plus my text is not in English (I'm not sure if that could be a factor).
Comments
Comment #1
TomDude48 CreditAttribution: TomDude48 commentedHow do you have TinyMCE installed? The content analysis module does have to turn TinyMCE off to work. It does this in the sites we have used it on, however, there are a few different ways to install it. That might be the issue.
Comment #2
jscm CreditAttribution: jscm commentedI have the same problem. I use CKEditor..
Comment #3
perfectweb CreditAttribution: perfectweb commentedI have the same problem on the 7.x-2.0 branch. I am using WYSIWYG editor with the ckeditor interface (latest stable version of both)
Comment #4
TomDude48 CreditAttribution: TomDude48 commentedComment #5
perfectweb CreditAttribution: perfectweb commentedHaving looked at this issue a bit further, I'm not sure if this is maybe an issue with Content analysis, rather tan content optimizer.
My situation is this. I have a node (id = 2), and that node has 4 words of content saved in the body field.
I edit the node, and replace those 4 words with a full article (approx 500 words). Before saving the content I choose to click the "analyze content" link in the "Content Analysis" vertical tab.
Having printed out the "$context" array from within the "contentoptimizer_analyzer" function, I see that $context[body] has the 4 words in the unsaved content and not the full article that I have now entered.
Is the module expecting me to save my content before running analysis? Is this the desired behaviour?
Comment #6
TomDude48 CreditAttribution: TomDude48 commentedThis is an issue with content analyzer, not optimizer (you are correct). You don't have to save it first. It does do a node_load to fill in the node object struct but then overwrites the node edit field info.
What is odd is it works on my local machine with ckeditor. I did modify the ckeditor autodisable detect for D7. It will be in the beta 2 release. Try that one and see if it fixes it. I will do the beta 2 push in the next day or so.
Comment #7
perfectweb CreditAttribution: perfectweb commentedGreat Tom,
I'l keep an eye out for it!
Comment #8
heyyo CreditAttribution: heyyo commentedI still have this bug with last dev of content analyzer
Comment #9
heyyo CreditAttribution: heyyo commentedComment #10
chefnelone CreditAttribution: chefnelone commentedSame problem here. Word count in the body doesn't refresh after I change the text. Using ckeditor.
Dev version didn't fix it.
The dev version hasn't change since 2012-Feb-17.
Any plan to fix this?
Comment #11
castawaybcn CreditAttribution: castawaybcn commentedSame here with 6.x-1.6 and CKEditor. There is a workaround, albeit not a user friendly one: if you switch to plain text editor and refresh the quick SEO report it does seem to work.
Comment #12
chefnelone CreditAttribution: chefnelone commentedno fix for this?
Comment #13
drew29 CreditAttribution: drew29 commentedAre there meanwhile a solution for the problem?
Comment #14
vkapas CreditAttribution: vkapas commentedSame bug with CKeditor 7.x-1.12 and Content Analysis 7.x-1.0-beta6 :-(
Comment #15
gmgallag CreditAttribution: gmgallag commentedWas receiving the same error. Tracked it to line 170 of contentanalysis.js. The body textarea tag id is dependent on language (declared as English in my case). Hence, I changed
data.body = $('#edit-body-und-0-value').val();
to
data.body = $('#edit-body-en-0-value').val();
and I now get a correct word count.
Comment #16
gladiatorhl2 CreditAttribution: gladiatorhl2 commentedFor the version 7.x-1.0-beta7 it didn't help to change that line.
Comment #17
gladiatorhl2 CreditAttribution: gladiatorhl2 commentedPerhaps, it is worth mentioning that in my case the text area isn't in English. Is there a solution for non-English characters that word count would work properly?
Comment #18
kyletaylored CreditAttribution: kyletaylored at LevelTen Interactive commentedIt looks like this issue has to do with the selectors looking for "und" by default, so on multilingual sites, it will never select them.
Added a language variable to the settings object that we can access now.