When edit meta tags is enabled the user also sees edit meta tags on the account pages where they edit their username, password etc.. With normal content then admin can turn off editing of meta tags in the content type but there seems no way to turn it off for user account pages. Meta tags on these pages does not make a lot of sense anyway since only the user sees those pages not searches engines. I think meta tags should be restricted just to nodes (and views).

Comments

briansea’s picture

While this isn't the most elegant way, creating a module with this in it will fix your problem:

function MODULENAME_form_user_profile_form_alter(&$form, &$form_state)
{
	unset($form['nodewords']);
}

Hope this helps.

apaderno’s picture

Title: Meta tage edit on user edit form » Add the option to disable the meta tags editing for users
Category: bug » feature

Search engines can see also the user profiles pages, if the anonymous user has the access user profiles permission.

This is more a feature request. I will value it.

apaderno’s picture

Status: Active » Fixed

The code has been changed for version 6.x-1.x-dev, and committed in CVS.

apaderno’s picture

The meta tags fieldset is still visible in the user profile pages to the users with administer users permission; those users can still set the user meta tags, but their value will not be used when the user meta tags are not enabled.

Status: Fixed » Closed (fixed)

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

vmenelas’s picture

This is not working for me.
I added the above code in my css, any ideas?

apaderno’s picture

There is nothing reported here that should be added to a CSS file; what you see is PHP code.

vmenelas’s picture

Oh I see, where do I add this php code?

apaderno’s picture

Version: 6.x-1.0 » 6.x-1.x-dev

As the code has been already added in the development snapshot, there is no code to add (click on "View all the releases" to see the link to version 6.x-1.x-dev).

apaderno’s picture

Issue tags: +6.x-1.0

I am adding a tag to track the differences between version 6.x-1.0 and version 6.x-1.1-beta1.

kthull’s picture

I made a custom module as recommended in #1 and it did the job. Thanks and +1!

danyaeldemonic’s picture

How do you create a module with that code?

kthull’s picture

Not as scary as it seems. In my case, I named my module profile_meta, so I created a folder named profile_meta in my sites/all/modules/custom folder (doesn't need to be inside a folder named custom, but that lets anyone maintaining the site know it's not a contrib module).

Next, create a file named profile_meta.info and in it:

; $Id:$
name = "Profile Meta"
description = "Remove the meta tags section from the user profile page"
package = "Custom"
core = 6.x

version = "6.x-dev"
core = "6.x"

Then, create a file named profile_meta.module and in it:

<?php
// $Id$

/**
 * Implementation of hook_form_alter() per http://drupal.org/node/445464#comment-1639924
 */
 
function profile_meta_form_user_profile_form_alter(&$form, &$form_state)
{
unset($form['nodewords']);
}

Last step, turn on the module and you are all done. Naturally, if you want to name your module something different, you can, just replace "profile_form" with whatever you wish, but in all cases.

tyler-durden’s picture

kthull,
Thanks for the simple explanation, works beautifully and saved me hours of work testing and updating the module which is working just fine other than this change I needed.