The module only works on one type of default field configuration which is hard-coded. For example

$body = strip_tags($form_values['body']['und'][0]['value']);

The assumption made here is that the content of this node is fully-contained in the field with the machine name "body", and that there is no specified language for this content (indicated by 'und'). Ideally this should iterate over all text-based fields and be language-agnostic.

I'm marking this as a bug since it means the module doesn't work with core Locale and Content translation. You might consider this a feature request instead, but then it should probably be clear that the module isn't compatible with those modules yet.

Comments

HyperGlide’s picture

Issue tags: +SEO

Hello,

I would also agree with the previous post. We have more complex product types where we want to analyze all of the text across multiple fields to determine the ratio of text to keywords.

Might I suggest that in the "SEO Compliance Checker" node administration tabs at the bottom there be an addition of all the fields in the node type.
Then the admin can predefine what fields should be included in the analysis. I would imagine this could be done with some check boxes for the fields the then feed into the PHP as an array that combines the text and is then divided by the noted keywords.

Hope this will be considered moving forward.

miruoss’s picture

Hi there

Thanks for the report. I agree with you, 'und' should be replaced by the actual language of the node, so it's a bug which I plan to fix soon (sorry, I'm extremely busy at the moment)

The second thing is a feature request as you say which totally makes sense to me. I will get to it once I have fixed the open bugs.

Michael

HyperGlide’s picture

Thanks Michael!

miruoss’s picture

Assigned: Unassigned » miruoss
Status: Active » Fixed

The bug is fixed in the upcoming dev release. Please test it. I will probably create a new release soon.

For the feature request I opened a new issue: #1215586: Check other content than just the body of a node

Status: Fixed » Closed (fixed)

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

zibretni’s picture

In 7.x-1.x-dev from august 25th it is still not fixed. It does not work with a node with a choosen language.