A commit from earlier today has rendered Node Words unusable:

http://drupalcode.org/project/nodewords.git/commitdiff/e87f516bc52c3f7fd...

This line has a syntax error in it:

+        $value = empty($content['value']) ? '' : (empty($options['default']['description']['value']) ? : $options['default']['description']['value']);

Specifically the ? : part.

Comments

malancheril’s picture

I got the same error and had to pull nodewords off completely in order to get my site back online. Is this version compatible with Drupal 6.20?

quicksketch’s picture

This change is baffling. The value of $content['value'] will never be used at all. This could probably use a code-comment, because I'm not sure what we're actually trying to accomplish. Is this supposed to be doing "if the manually defined meta tag is empty, use the default?"

Right now it's actually saying "if the manually defined meta tag is empty, leave it empty. otherwise use the default if it's not empty. Never use the manually defined meta tag."

+        $value = empty($content['value']) ? '' : (empty($options['default']['description']['value']) ? : $options['default']['description']['value']);
+        $content['value'] = nodewords_metatag_from_node_content($node, $value);
Ela’s picture

subscribing

ayukko’s picture

got the error too

preper’s picture

same problem I can not update the module. And I have 65.000 node limit problem.. I think this should be fixed as soon as possible...

drupalgideon’s picture

Ditto

So I changed the line to

$value = empty($content['value']) ? '' : (empty($options['default']['description']['value']) ? '' : $options['default']['description']['value']);

but then got

Fatal error: Call to undefined function nodewords_unique_values() in /sites/all/modules/contrib/nodewords/nodewords_tokens/nodewords_tokens.module on line 187

And looking at a diff file it appears that this function has been renamed in nodewords.module -

-function nodewords_unique_values($text, $separator = ',', $max_items = -1) {
+function nodewords_unique($text, $separator = ',', $max_items = -1) {
mikeytown2’s picture

subscribe

sparkymark’s picture

subscribe - me too on drupal 6.20 when upgrading from the non dev version.

Ela’s picture

anyone found a solution yet?
Would changing to 6.x-2.0-alpha1 fix this?

damienmckenna’s picture

@Ela, if you have not already changed to one of the older 6.x-1.12 alpha/beta releases it is recommended to avoid the 6.x-2.0 releases.

Ela’s picture

Thank you. I Have not changed it. I'm using 1.x dev version from April 19th and it's working fine... Waiting for solution before using the new 1.x-dev version from May 4th

davethedruper’s picture

subscribing

Anonymous’s picture

Same here, as of May 26th on Drupal 6.20

camaraderie’s picture

I have this issue as well, it just came up for seemingly no reason. I recently updated to Drupal 6.22, but I don't know if that has anything to do with it.

Can anyone advise whether it's best to disable nodewords, use a different version, or alter the code? Thanks.

venusrising’s picture

Same issue here

venusrising’s picture

@Ela do you have a copy of April 19th version or where to get it?

mattcasey’s picture

Same issue, just downloaded the 6.x-1.x-dev however like #6 adding the '' worked for me. I did not get any errors after that.

xjm’s picture

Ela’s picture

@venusrising ... I had it on my computer. If you still need it, contact me though my profile contact form, and I can email it to you

bcobin’s picture

Subscribing - this is really critical. 1.11 does not generate meta tags from content AFAICS, 2.x isn't recommended and 1.x-dev results in WSOD.

If there's an earlier dev version that works or a patch to 1.11, that would be a really good thing insofar as it looks like there's a bunch of us dead in the water here - thanks!

dave reid’s picture

Status: Active » Closed (duplicate)