If you set the meta tag Keywords to keywords the HTML tag is set to

<meta name="keywords" value="k" />

As the values saved in the database table are correct, I guess the problem is caused by the operator [], which is used for array and string; in some places the code is probably using a string when is supposed to use an array, and that is causing the problem seen.
It is a problem with the values visualized, not with the values saved.

There is a report about this problem; I am not able to find it, and I guess it is reported in a bug report that has a different topic. I opened this report because each report should report a single bug.

Comments

avpaderno’s picture

Title: Code uses only the first character of the meta tag Keywords » Code shows only the first character of the meta tag content

I am changing the title; the problem seems to be present with other meta tags as well.

avpaderno’s picture

avpaderno’s picture

I marked #588732: String/array problem as duplicate of this report.

hass’s picture

Priority: Normal » Critical

Data loss is critical

avpaderno’s picture

Status: Active » Fixed

The code has been changed, and committed in CVS.

hass’s picture

PLEASE do not commit 6 patches at once and three times with the same comment. It makes it completely impossible to review buggy commits!

I would really love to understand the change that have been made to get this bug as I've also tried to debug and fix it...

With these 6 patches you have introduced a bug. form_error($element, t('The keywords must be a comma separated list of words.')); changed to form_error($element, t('The meta tag value must be a comma separated list of words.')); should be rolled back - usability and self speaking wise.

hass’s picture

Status: Fixed » Needs work

Aside - could you please not simply DROP the revisit time and provide an upgrade path!? Simply deleting all entered user data is a no-go!

avpaderno’s picture

With these 6 patches you have introduced a bug.

Does the keywords must be a comma separated list of words sound like a good English sentence?
What should the usability issue be?

Also, the meta tag Revisit-After has not been dropped.

avpaderno’s picture

Please do not install the development snapshot in a production site; the code still needs to be changed to make possible a smooth update without to lose any data/settings.

avpaderno’s picture

I will change the code to update the content of the meta tag Revisit-After tomorrow; the update function can be rewritten to change the old value to the new format, but it depends on the batch API, and it is not guaranteed to work in all the cases (especially in a site with many meta tags database rows).

I will also add a page that allows to reset the meta tags to their default value, in the case there is a problem with the values saved in the database.

avpaderno’s picture

Status: Needs work » Fixed

The code has been changed, and the update function updates the meta tag content from the old format to the new format.

hass’s picture

What should the usability issue be?

Telling users with a form error "there is an issue in the meta tags" do not help users what they need to fix to get the values saved. Telling the users the *keywords* need to be a *comma* separated list on the other side IS helpful.

Please do not install the development snapshot in a production site; the code still needs to be changed to make possible a smooth update without to lose any data/settings.

I'm already running the DEV in production. 6.x-1.2 is such a buggy and cluttered release that most of us have NO other choice! It would be great if you would not release such an untested and buggy software and make sure the upgrade now works inter-DEV, please! I do not understand why you have not created a 2.0 branch and started there with the overhauled new version. This would have made it easy to understand that we need to do more testing before an upgrade and easier to fix security issues.

Now I need to upgrade to the latest DEV to get the Code shows only the first character of the meta tag content bug fixed. PLEASE take care of users that must use DEV versions if you release BUGGY software! It's not our fault that we have been made by the security warning to install a super ultra buggy nodewords version marked as critical security release that needs an immediate upgrade.

avpaderno’s picture

I do not understand why you have not created a 2.0 branch.

I cannot create something that already exists; branch 2.0 is code created by the maintainer, and I am supposed to change the code in the 1.0 branch.

avpaderno’s picture

Telling users with a form error "there is an issue in the meta tags" do not help users what they need to fix to get the values saved. Telling the users the *keywords* need to be a *comma* separated list on the other side IS helpful.

function basic_metatags_keywords_form_validate($element, &$form_state) {
  if (trim($element['#value']) == ',') {
    form_error($element, t('The meta tag value must be a comma separated list of words.'));
  }
}

That is the code that has been already committed, and you are referring in your comment. It does comment itself.

hass’s picture

I cannot create something that already exists; branch 2.0 is code created by the maintainer, and I am supposed to change the code in the 1.0 branch.

Than you have been able to override this code like it have no been done in the cluttered 1.x version or move 2.x code to 3.x and your code into 2.x. Everything is better than the current cluttering of 1.x. New versions or overhault versions should ALWAYS go into a new branch to keep stable versions STABLE and experiments can be developed independed from stable branches. 30.000 sites are not guinea pigs!

That is the code that has been already committed, and you are referring in your comment. It does comment itself.

Not really. If I edit keywords the error message should tell the "keywords" -> 'The keywords must be a comma separated list of words.'

avpaderno’s picture

See the latest committed code: The meta tag Keywords value must be a comma separated list of words..
There is already a report about strings review; that was a better place to debate this.

avpaderno’s picture

I marked #596016: Canonical URL is not working as duplicate of this report.

Status: Fixed » Closed (fixed)

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