Hi,
I have a big problem.
I use the Dublin Core Creator and enered if on every single site. Now in the html it takes the user (so in my case root) as Dublin Creator. But I enered in the field dublin creator for the node the right creator.

So where is my mistake? For the other fields like decription nodewords works.... Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chris_bbg888’s picture

Category: support » bug

Ok , i tested it now on a second drupal installation. its the same problem. So it seems to be a bug to me.

apaderno’s picture

Assigned: chris_bbg888 » Unassigned
Status: Active » Postponed (maintainer needs more info)

I am sorry, but I have not understood what the problem is. May you describe it in detail?

chris_bbg888’s picture

Thanks, sorry my English is no the very best.
So I use nodewords and enter for every single node the metatags "description", "Dublin core creator" and "Dublin Core Title".

If I have a look in the html output of a site it shows me for "description" and "Dublin Core title" the words I entered. Thats fine.
The problem is with the dublin core creator. In the html code it shows the the username (like root, chris) that published the article. What I want is that in the Dublin Core Creator Metatag it shows me the name I entered in the node. So basically nodewords uses the username instead of the Dublin Core Creator I entered manually.

I hope you know what to do :) Thanks

apaderno’s picture

Status: Postponed (maintainer needs more info) » Active

Basically, I would enter (in example) Alberto Paderno, and the module would print out kiamlaluno.

chris_bbg888’s picture

Exactly. I tried this with two different drupal installations. :(

apaderno’s picture

Title: For Dublin Creator username not creator used » Meta tag DC.CREATOR always uses the Drupal username
Version: 6.x-1.3-beta5 » 6.x-1.x-dev
Status: Active » Fixed
FileSize
1.29 KB

The code has been changed, and committed in CVS.
The attached file is the patch for the development snapshot.

Thanks for your report.

apaderno’s picture

FileSize
1.13 KB

The previous patch didn't consider the default value for the meta tag; the attached patch is the correct one.

apaderno’s picture

FileSize
1.35 KB

This is the patch that changes the code for the meta tag DC.CONTRIBUTOR too.

chris_bbg888’s picture

Title: Meta tag DC.CREATOR always uses the Drupal username » For Dublin Creator username not creator used
Version: 6.x-1.x-dev » 6.x-1.3-beta5
Status: Fixed » Active

sorry guys I dont get it.
I opend the file nodewords_extra.module but cannot find the lines you mentioned.

In front of some lines there is no "-" or "+". Some other line includes @
So actually I doent know what to change as I get an error for updating drupal now.

I deleted this

function nodewords_extra_dc_creator_prepare(&$tags, $content, $options) {
  if ($options['type'] == 'node' && count($options['ids']) == 1) {
    $bool = (
      ($node = node_load($options['ids'][0])) &&
      ($uid = $node->uid) &&
      ($user = user_load($uid)) &&
      $user->name
    );

    if ($bool) {
      $tags['dc.creator'] = $user->name;
    }
  }
} 

Instead I have this:

 function nodewords_extra_dc_creator_prepare(&$tags, $content, $options) {

 if (!empty($content['value'])) {
 $tags['dc.creator'] = $content['value'];
 }
 elseif (!empty($options['default']['dc.creator']['value'])) {
   $tags['dc.creator'] = $options['default']['dc.creator']['value'];
 }
 else {
     if ($options['type'] == NODEWORDS_TYPE_NODE && count($options['ids']) == 1) {
       $bool = (
         ($node = node_load($options['ids'][0])) &&
@@ -259,9 +265,6 @@ function nodewords_extra_dc_creator_prep
       }
     }
   }
 else {
   $tags['dc.creator'] = $content['value'];
 }
 }

There must be something wrong. Sorry about that

apaderno’s picture

Title: For Dublin Creator username not creator used » Meta tag DC.CREATOR always uses the Drupal username
Version: 6.x-1.3-beta5 » 6.x-1.x-dev
Status: Active » Fixed

See the referring version I set.
In Drupal.org it is not possible to change an official release; you can only create another official release, which is created from the development snapshot.

chris_bbg888’s picture

Title: Meta tag DC.CREATOR always uses the Drupal username » For Dublin Creator username not creator used
Version: 6.x-1.x-dev » 6.x-1.3-beta5
Status: Fixed » Active

you guys probably entered the right code in your file / installation. maybe you can post the right nodewords_extra.module. that'll be great. thanks

apaderno’s picture

Title: For Dublin Creator username not creator used » Meta tag DC.CREATOR always uses the Drupal username
Version: 6.x-1.3-beta5 » 6.x-1.x-dev
Status: Active » Fixed

See http://drupal.org/cvs?commit=296782, http://drupal.org/cvs?commit=296792, and http://drupal.org/cvs?commit=296798.
When I mark a report as fixed is because I committed the code.

chris_bbg888’s picture

Title: Meta tag DC.CREATOR always uses the Drupal username » For Dublin Creator username not creator used
Version: 6.x-1.x-dev » 6.x-1.3-beta5
Status: Fixed » Active

so which version do i use? sorry I'm new to programming & drupal?

apaderno’s picture

Title: For Dublin Creator username not creator used » Meta tag DC.CREATOR always uses the Drupal username
Version: 6.x-1.3-beta5 » 6.x-1.x-dev
Status: Active » Fixed

Please leave the issue as I set it.

Status: Fixed » Closed (fixed)

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