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!
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | content_profile.theme_.inc_.patch.txt | 663 bytes | niklp |
Comments
Comment #1
scotese commentedOk - 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.
Comment #2
scotese commentedSo 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!
Comment #3
fagoComment #4
pauldawg commentedI 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.
Comment #5
fagoindeed.
Comment #6
niklp commentedIf 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.
Comment #7
niklp commentedOk 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));Comment #8
pauldawg commentedGreat! I will give it a try! Thanks!
Comment #9
fagothanks - 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.
Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #11
donquixote commentedI'm still seeing underscores in "user/%user/profile/$type". And uppercase letters.
Places to be fixed:
content_profile_menu()
content_profile_default_path_handler()
Comment #12
fagoI don't think they hurt there.