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

TomDude48’s picture

How 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.

jscm’s picture

I have the same problem. I use CKEditor..

perfectweb’s picture

Version: 6.x-2.2 » 7.x-2.0-beta1

I 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)

TomDude48’s picture

perfectweb’s picture

Having 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?

TomDude48’s picture

Status: Active » Needs review

This 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.

perfectweb’s picture

Great Tom,

I'l keep an eye out for it!

heyyo’s picture

I still have this bug with last dev of content analyzer

heyyo’s picture

Project: Content Optimizer » Content Analysis
Version: 7.x-2.0-beta1 » 7.x-1.x-dev
Status: Needs review » Needs work
chefnelone’s picture

Same 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?

castawaybcn’s picture

Same 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.

chefnelone’s picture

no fix for this?

drew29’s picture

Are there meanwhile a solution for the problem?

vkapas’s picture

Same bug with CKeditor 7.x-1.12 and Content Analysis 7.x-1.0-beta6 :-(

gmgallag’s picture

Was 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.

gladiatorhl2’s picture

Issue summary: View changes

For the version 7.x-1.0-beta7 it didn't help to change that line.

gladiatorhl2’s picture

Perhaps, 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?

kyletaylored’s picture

Title: Word-count in body text doesn't seem to work » Not compatibile with multilingual sites
Status: Needs work » Fixed

It 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.

  • kyletaylored committed 4a45eef on 7.x-1.x
    Issue #1069204 by kyletaylored: Not compatibile with multilingual sites
    

Status: Fixed » Closed (fixed)

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