I know that I am missing something (intellectually - not in code) here - and I apologize for that. But, I am trying to use the content profile node and I have gotten as far as creating the link within the users profile. But -- when they click on the link (at their user page) to create their Content Profile - instead it takes them to a list of all the types of content that they can create (Audio, Blog, etc) including their content profile -- from their they can indeed choose their Content Profile and when they enter it -- it does appear on their user page. How do I get the link to go directly to that Content Profile instead of having my users have to choose which type of content to create. Thanks!

CommentFileSizeAuthor
#7 content_profile.theme_.inc_.patch.txt663 bytesniklp

Comments

scotese’s picture

Ok - after doing a little more investigating it seems this happens because the link on the user page uses a "_" instead of a "-" When I copy the shortcut and make the switch in the browser -- it works fine. I know absolutely no coding -- how can I fix the link? Thanks.

scotese’s picture

So I changed the name so it didn't have an underscore (but I think this was the default -- so it might pop up quite a bit.) -- and now all works well -- hurray!

fago’s picture

Status: Active » Fixed
pauldawg’s picture

Status: Fixed » Active

I am resetting the status to active. Scotese implemented a work-around, not a fix. The problem is still a bug, namely that the underscore is supposed to be converted to a hyphen and it isn't. It's probably a simple fix.

fago’s picture

Title: User does not go to content profile - goes to entire list of create content. » wrong link to add a new content profile
Category: support » bug

indeed.

niklp’s picture

If someone tells me the preferred method for swapping the underscore to a hyphen, I will look into this. I have a suspicion that this might need looking at in more than one place also.

I confirm this bug under 6.x-dev as of Sept 4th.

niklp’s picture

StatusFileSize
new663 bytes

Ok attached is a patch *against HEAD*. It fixes the underscore issue in the "Create your [content profile]" link, and three spelling errors; s/hanlder/handler/g

If the patch breaks, what you need to do is change the line in content_profile_get_add_path() (EDIT: this function lives in content_profile.theme.inc) to:

return $handler('add', str_replace('_', '-', $type));

pauldawg’s picture

Status: Active » Needs review

Great! I will give it a try! Thanks!

fago’s picture

Status: Needs review » Fixed

thanks - I've fixed both the typo and the link issue. Furthermore I've improved the fix, so that the handler does the replacement - so other possible handlers get to know the real node type.

However I was not able to apply the patch: For future patches please make sure it's unified diff format, see http://drupal.org/patch/create.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

donquixote’s picture

Status: Closed (fixed) » Active

I'm still seeing underscores in "user/%user/profile/$type". And uppercase letters.

Places to be fixed:
content_profile_menu()
content_profile_default_path_handler()

fago’s picture

Status: Active » Closed (works as designed)

I don't think they hurt there.