PHP version 5.2.6 / MySQL version 5.0.89-community / Drupal 6.16

Greetings,

I'm having a problem with Nodewords, first I would like to say that I also have upgraded to nodewords-6.x-1.12beta4 once and then downgrade back to 6.x-1.11 so this might be what is causing this problem.

When I enter data for the description tag in a node or "Default and specific meta tags" it saves it and gives me a green confirmation, but if I go back to edit the description tag data is missing?

I have only tried with the description tag, other things as setting up a path for "other pages" works fine and are still there when returning back to edit.

Hopefully I have describe the problem and if there is anything I can do to collect more useful info about this please let me know.

All the best,

Thomas

Comments

Anonymous’s picture

Assigned: skiff » Unassigned
chazz’s picture

Try 6.x-1.12-beta3 version, this fixed same problem for me

tharrison’s picture

I have the same problem in general, and applied a patch that allowed descriptions to save correctly when coming from a taxonomy term; now I am having a problem saving description on "other" pages (/admin/content/nodewords/meta-tags/other/edit/1).

I do not see the other versions (1.12, 1.13, etc) mentioned in various threads listed on the module page. Has there been a patch for this problem? If so, it would be very helpful to have a specific reference to a URL or file; I have had little success finding stuff.

tharrison’s picture

An update to my report: the "other" page nodewords data is being properly saved by the admin form. The content associated with the row containing the description in the database (nodewords table) does contain my edits.

However, when I go back to edit the data again, it is not shown in the edit form I noted above (the description field is blank). Further, I believe that the value is not being used when the matching path is loaded.

Is there a known solution?

dutchie76’s picture

Priority: Normal » Critical

Hi,

Yes same issue here. I am trying to input meta tags data for taxonomy values but Nodewords is not saving the meta data. As such taxonomy items are unable to display meta tags.

Would be very greatful for some feedback and a fix.

Thanks

D

tharrison’s picture

Dutchie -- I think there's a different issue with nodewords and taxonomy terms, which I was able to fix with a patch posted her: http://drupal.org/node/672096

My issue has similar symptoms but is related to nodewords for other pages.

It would be super nice if there were any solution for my problem. I have been working on debugging the code to isolate the problem without much success so far. I diffed against one of the numerous other versions out there, but the changes were too many, and with little actual documentation or other guidance, it's going to take a while.

scotthoff’s picture

Mine is also not saving. I upgraded ALL of my modules in an effort to make sure there was no conflict...

doublejosh’s picture

Version: 6.x-1.11 » 6.x-1.12-beta4

Me too.

I get "The configuration options have been saved." but the default, global, meta tags DO NOT SAVE.

Just downloaded today (6.x-1.12-beta4)

Went back to 1.11

bkalbs’s picture

I just started using 1.11 today and am also having this same problem. Data looks to be saving correctly to the DB, but description and keywords are not being displayed upon reopening the custom page edit form, and they are not actually being output into the html of the page at all.

LuckyBamboo’s picture

"description and keywords are not being displayed upon reopening the custom page edit form, and they are not actually being output into the html of the page at all"

Exactly the same problem here too.

scotthoff’s picture

Reverted back to the last stable release and it works..

RichieRich’s picture

Same problem here...

Can somebody point me at a version of this module which actually works. It's definitely caused me more problems than any other module which I've used.

vincenzo’s picture

1.11 here, never used any other version, same problem.
Any clue?

vincenzo’s picture

Ok, the patch linked by http://drupal.org/node/754330#comment-2792242 is working fine: it does solve the problem with nodewords not saving data for taxonomy terms.

What's left now is (at least from my point of view) nodewords not filling up correctly the form for "Others". Basically, if you go to the "Others" section, set up a new custom page meta tags, and fill in the tags, this will show up the correct meta tags in the page specified; however, if you go back and edit the mentioned custom page meta tags, the form will show up blank.

I am working on this one.

scotthoff’s picture

Do you have to implement patches from command line in linux? I can't just drop the patch someowhere and have it be implemented?

dunklea’s picture

I am having the same problem as many of the other people here so I think we are all eagerly awaiting your patch. Thanks! Anyway, I do have a question. If I want to create custom meta tags for pages created with Views, will I be able to do that under the "Other Pages" tab?

alex dicianu’s picture

Subscribing ...

serbanghita’s picture

Subscribing. I have the same issue!

JThan’s picture

Same one here.

vincenzo’s picture

StatusFileSize
new1.79 KB

Ok, I summarise:

1. I repeat my last comment, by saying: the patch you find here http://drupal.org/node/672096#comment-2532618 will solve the problem with meta tags not being saved on taxonomy terms;

2. the patch you find attached to this comment will *also* solve (since I applied the patch above, my patch includes it) the problem with the "Other pages" form not retrieving the informations (correctly) saved into the DB.

The two ones above are the only issues regarding the "saving" ability of this module.

Please, find the patch attached.

Cheers,

Vincenzo

PS: I think I will also file another issue, though, as it is more correct if I release a patch just for the "Other pages" problem, and keep the one at http://drupal.org/node/672096#comment-2532618 separated from this.

PPS: the patch is built against the latest stable (1.11) on purpose. I will then release patches for the dev branch (which looks quite different).

alex dicianu’s picture

Hi Vincenzo,

Thank you for the patch, it works great, the meta tags are getting saved.
I've tried to look into the problem of displaying the tags and I've found that in the function called nodewords_get_tags there is a parameter called $ids which is used in a query like the one below:
db_query("SELECT * FROM {nodewords} WHERE type = %d AND id = %d", $type, $ids[0])
The problem is that $ids[0] is a string which defines the path and not an id. Something like "node/52".

I am not a Drupal developer, I think this is the first time I browse the code.
I've tried to create a patch function that seems to work, but I ask you to revise it.

Just copy paste the function in nodewords.module

function nodewords_get_pid_by_path($path) {
    if( empty($path) ) return null;
    
    $path_arr_  = explode("\n", $path);
    $result     = db_fetch_array(db_query('SELECT `pid` FROM {nodewords_custom} WHERE `path` LIKE "%%%s%" LIMIT 1', $path_arr_[0]));
    
    $pid = (int)$result['pid'];
    if( empty($pid) ) return null;
    
    return $pid;
}

and in the function called nodewords_get_tags I've added this line $ids[0] = nodewords_get_pid_by_path($ids[0]);

if (!is_array($ids)) {
    $ids = array($ids);
}

$ids[0] = nodewords_get_pid_by_path($ids[0]);
alex dicianu’s picture

a small correction to the function

function nodewords_get_pid_by_path($path) {
    if( empty($path) ) return null;
    if( in_array((int)$path, array(404, 403)) ) return $path;
    
    $path_arr_  = explode("\n", $path);
    $result     = db_fetch_array(db_query('SELECT `pid` FROM {nodewords_custom} WHERE `path` LIKE "%%%s%" LIMIT 1', $path_arr_[0]));
    
    $pid = (int)$result['pid'];
    
    //default meta tags
    if( empty($pid) ) return 0;
    
    return $pid;
}
Anonymous’s picture

I've tried to look into the problem of displaying the tags and I've found that in the function called nodewords_get_tags there is a parameter called $ids which is used in a query like the one below:
db_query("SELECT * FROM {nodewords} WHERE type = %d AND id = %d", $type, $ids[0])
The problem is that $ids[0] is a string which defines the path and not an id. Something like "node/52".

Version 6.x-1.12-beta4 (the version for which this report has been open) doesn't have that function, nor the variable $ids is used.

alex dicianu’s picture

I am using the stable 6.x-1.11 and the issue is present. The fix was made for 6.x-1.11.
Hope that in the next stable release this won't be an issue any more.

Anonymous’s picture

Version: 6.x-1.12-beta4 » 6.x-1.11

That's right; somebody has changed the referring version.

The code has been already changed before to create version 6.x-1.12-beta4; the code reported in comment #22 does not apply to the latest developed code.

mattcasey’s picture

It seems that a patch has been made to fix 6.x-1.11? I was having problems editing even a Term's regular description (as opposed to meta description) unless I turned off particularly the "Administrative Interface" for Nodewords, using the dev and then 1.12 beta 4 unpatched. I reverted to beta 3 and things work fine again.

Anonymous’s picture

Status: Active » Postponed (maintainer needs more info)

I cannot reproduce this issue on the latest developed code. May anybody else report if the issue is present in the latest development snapshot?

Rameez’s picture

How to apply this patch? please say in simple steps? Thanks

0xC0FF33’s picture

Same here for me. With Version 6.x-1.9 i made the keywords working, but description for custom pages won't work at all. I only can set th global defaults, which are working fine, but can't be a solution.

When will there be a patch or new release? I mean, this bug is really critical - wake up developer!

scotthoff’s picture

I agree it is obnoxious but who knows if provoking the developer will motivate them to fix the bug...

Rameez’s picture

Category: bug » support
Status: Postponed (maintainer needs more info) » Needs work

please release the fix soon....its really required

Anonymous’s picture

Category: support » bug
Status: Needs work » Postponed (maintainer needs more info)

See comment #27; may anybody else report if the issue is present in the latest development snapshot?

mattcasey’s picture

kiam, thank you very much. the latest snapshot from 4/19 has fixed this issue for me.

Rameez’s picture

@mattwad Can u give me the link please?

mattcasey’s picture

Sure, it is the latest dev release from the module page: http://ftp.drupal.org/files/projects/nodewords-6.x-1.x-dev.tar.gz

Rameez’s picture

friend, is it safe to use this dev version on production site? are u using it on your website? thanks for help

Anonymous’s picture

friend, is it safe to use this dev version on production site? are u using it on your website?

It is better to not use a development snapshot in a production site, and if you want to use it, it's better to have a backup of the database data.

akoymakoydpl’s picture

i dont see anything fixed from the link given on #35... i cant view/add/edit any of my custom pages after i applied the snapshot. Any fix for this issue? or did i do anything wrong .. i downloaded the zip on the link provided on #35 and extracted it to the module folder..

"Sure, it is the latest dev release from the module page: http://ftp.drupal.org/files/projects/nodewords-6.x-1.x-dev.tar.gz"

alex dicianu’s picture

The problem is that for custom pages, $ids comes as an id (Eg: 52) and for "Default and specific meta tags" $ids comes as a path (Eg: node/52).
I experienced the same issue and I fixed it like this:
Try replacing

$ids[0] = nodewords_get_pid_by_path($ids[0]);

with

if((int)$ids[0] <= 0) {
  	$ids[0] = nodewords_get_pid_by_path($ids[0]);
}

This piece of code works just fine on my Drupal installation.

dunklea’s picture

Just to update every one, the latest version of the 6.12 series did not work on my site. Whenever I tried to add a custom meta description page I was given a blank screen. I couldn't seem to find any way around it. Anyway, I back tracked down to version 3 of that series which seems to be working so far..

venusrising’s picture

Same issue, My descriptions do not change either and I do not see the code noted in #39 anywhere in the module files to alter.

Anonymous’s picture

Title: Nodewords won't save my description tag. » Nodewords won't save my description tag

The code reported in comment #39 does not exist anymore in the module, as the code has been already fixed in the development snapshot.

Is there anybody who can confirm the issue is not present in the development snapshot? As far as I can report, the issue is not present in the latest developed code.

venusrising’s picture

Using dev modules on production sites is best idea, what can we do to make the stable version work?

venusrising’s picture

I tried installing the dev but I get an SQL error does 6x 1.11 need to be uninstalled first. Is there any patch for the stable version to get this to work ?

venusrising’s picture

Thanks! After sifting through this I saw your post and it works for me, thanks for posting it.

venusrising’s picture

Followed someones advice on a using 6x 1.12 beta 3 and it works!

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Fixed

I am changing the status as per previous comments.

Status: Fixed » Closed (fixed)

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

nestor.mata’s picture

StatusFileSize
new2.52 KB

For those that had this issue and don't want to upgrade to dev version yet (I won't install dev modules on live sites) I recompiled this from the patches in previous comments and the fixes to those patches.
I confirm this works and fix version 6x.-1.11 for taxonomy and other pages.

~ Nestor

volocuga’s picture

#49 does not work for me. Description and keywords saving normally but disappeared from html source.
Hard module :P

laProbeta’s picture

Suscribe

Mario2’s picture

this patch fixed non-node meta tags saving for me but unfortunataly it killed all my node-type meta tags! they just dissapeared! DONT USE IT!

m.stenta’s picture

StatusFileSize
new2.55 KB

The patch in #49 forgot to include the fix from #39, which is why node-type meta tags were no longer working (see #52 above). I've attached a patch that combines #49 with the fix in #39.

I've applied this patch to the 6.x-1.11 release and both my taxonomy and "other pages" meta tags seem to be working properly.

Anonymous’s picture

Patch in comment #53 is based on a old development snapshot; I get it has not been updated, and it is then not useful at all.

m.stenta’s picture

Yep, the patch in #53 is for 6.x-1.11, so don't use it otherwise!

To be clear, it is intended for people who are using 6.x-1.11 and need "taxonomy term" and "other pages" meta tags functionality.

Exploratus’s picture

Patch #53 seems to work. Tested it and descriptions appear again on both taxonomy and other on 6.11. Thanks.

hedac’s picture

thank you #53
Now it works... just after apply the patch I went to edit one of the other pages metadata... and the data was already there... and now it outputs also in the page as it should.

but I have to say... what is going on with this module? Why so much chaos in versions and upgrades? And how is it possible that this bug is in the recommended stable version 1.11? Anyway...

pwilson’s picture

StatusFileSize
new1.33 KB

Based on patch #53, this patch fixes the original problem of tags not saving for custom paths, AND it's meant to be applied against the recommended stable 1.11 release. It works for me, but please back up your site and take all other prudent steps before testing this in your environment! Please let me know how it works for you!

Clément’s picture

Thank you very much for this patch, it works for me!

marcano’s picture

My company SEOCompany4 is working on page layout for a user generated UK news drupal site (www.blottr.com). The site is predominantly made of taxonomy category landing pages. It would be a real help to be able to set the meta descriptions on the main category pages. The patch looks good, but we would prefer a full release. If you are interested, please could you contact me with a bounty price I could offer my client to have this brought to full release, and I will see if I can raise a contribution to the work.

jeffryartavia’s picture

I made some changes to the function (nodewords_taxonomy)
it should be changed for this one in the file:
sites\all\modules\nodewords\nodewords.module

function nodewords_taxonomy($op, $type, $object = NULL) {
  if (isset($object)) {
    switch ($type) {
      case 'term':
        $type = NODEWORDS_TYPE_TERM;
        $id = $object['tid'];
        break;

      case 'vocabulary':
        $type = NODEWORDS_TYPE_VOCABULARY;
        $id = $object['vid'];
        break;

      default:
        return;
    }
     switch ($op) {
      case 'delete':
        nodewords_delete_tags($type, $id);
        break;

      case 'insert':
      case 'update':
        if (isset($object['nodewords'])) {
          nodewords_save_tags($type, $id, $object['nodewords'], TRUE);
        }
        break;
    }
  }
}

It worked fine for me without any secundary effects and i dint use any extra patch.

designotb’s picture

This patch worked perfectly for me!

Thank you very much.

mja’s picture

Patch in #58 works great for me! Thanks uncultured...

ryanoreilly’s picture

I keep getting,

patching file nodewords.module
patch unexpectedly ends in middle of line
patch: **** malformed patch at line 40:  

when trying to patch #58, any ideas?

EDIT: Went back to 6.1.10 for now, seems like the best temporary fix.

dillonkin’s picture

Same issue here. When I add keywords and description to a specific url under meta tags/other they DO NOT save. Any progress on releasing a fix on the stable version: 1.11.

Anyone using 1.10? Does it work fine? Might have to revert back to an older version.

dillonkin’s picture

I've created page.tpl pages for the specific ones I need for now. Might be an option for some of you guys as well. Clearly not viable if you have a lot of specific pages you need metatags for though.

Gemini Lights’s picture

Can anyone please give me instructions on how to apply patch #58?

Cheers.

marcano’s picture

Cool thanks! we got it fixed and it all works nicely again. Thanks. Sorry not to tell any earlier

broncomania’s picture

#61 Work for me THX

held69’s picture

#58 worked for me

tnx

venusrising’s picture

Status: Closed (fixed) » Active

We are also using the current suggested version but our OTHER pages we created no longer save the description. We looked at the above patch and were not sure if that actually works with this rolled back version of 6.x-1.11 as some of the code looks different.

venusrising’s picture

Can someone please comment on if any of these patches will work with the current stable version to get it to save description information.

mcpuddin’s picture

Status: Active » Reviewed & tested by the community

Patch #58 works with 6.x-1.11 and tested

Status: Reviewed & tested by the community » Needs work

The last submitted patch, nodewords.module.patch, failed testing.

R.Hendel’s picture

subscribe

venusrising’s picture

@uncultured YOU ROCK. This saved our butts.
#58 worked Here too.

damienmckenna’s picture

Status: Needs work » Closed (duplicate)

Lets consolidate all effort to get term metadata to save under this issue: #672096: Meta tags are not saved for taxomony terms or vocabularies

Gham’s picture

#61 worked for me

Thanks.

arun ak’s picture

Status: Closed (duplicate) » Active

For me node meta tags are also not working. Data is saving to the database but not retrieving at edit page. Please help me.

damienmckenna’s picture

Status: Active » Closed (duplicate)

@Arun: Please open a new issue and describe your setup.