Closed (fixed)
Project:
Content Profile
Version:
6.x-1.x-dev
Component:
Base module
Priority:
Critical
Category:
Task
Assigned:
Reporter:
Created:
14 Nov 2008 at 14:14 UTC
Updated:
27 Jan 2010 at 10:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
socialnicheguru commentedwhat is this used for?
did it make it in?
I am having trouble with pageroute and content profile and I am not sure if this might handle it.
I can create a route and assign it to a node type that I specified as a content profile but the content profile.
if i go back and used pageroute wizard to edit the content profile, none of my information is filled in.
i can go all the way, click submit, and I am given the error that a content profile already exists for this user.
Does your patch address this issue?
Thanks,
Chris
Comment #2
socialnicheguru commented# warning: include_once(sites/all/modules/content_profile/content_profile.pageroute.inc) [function.include-once]: failed to open stream: No such file or directory in /sites/all/modules/pageroute/pageroute.module on line 694.
# warning: include_once() [function.include]: Failed opening 'sites/all/modules/content_profile/content_profile.pageroute.inc' for inclusion (include_path='.:/Applications/MAMP/bin/php5/lib/php') in /sites/all/modules/pageroute/pageroute.module on line 694.
# warning: call_user_func(content_profile_page_view_profile::info) [function.call-user-func]: First argument is expected to be a valid callback in /sites/all/modules/pageroute/pageroute.module on line 376.
Comment #3
socialnicheguru commentedthe patch did not create a content_profile.pageroute.inc file.
That file is not included in the distribution of content_profile
Comment #4
socialnicheguru commentedThis still does not seem to work
I created a content profile
used pageroute to go back to the content profile to end
none of my data is shown
when I fill it in again, i get an error "this user already has a node of this type" (paraphrasing).
Comment #5
socialnicheguru commentedi had to
1. recreate my pageroute because now there is a content profile option which was not there pre-patch
2. I get differenent errors now
# warning: pageroute_page::include_once(sites/all/modules/content_profile/content_profile.page_edit_profile.inc) [pageroute-page.include-once]: failed to open stream: No such file or directory in /drupal/sites/all/modules/pageroute/pageroute.page.inc on line 62.
# warning: pageroute_page::include_once() [function.include]: Failed opening 'sites/all/modules/content_profile/content_profile.page_edit_profile.inc' for inclusion (include_path='.:/Applications/MAMP/bin/php5/lib/php:') in /drupal/sites/all/modules/pageroute/pageroute.page.inc on line 62.
content_profile.page_edit_profile.inc is not included however in a file. instead it is a class:
content_profile.pageroute.inc:17:class content_profile_page_edit_profile extends pageroute_page_edit {
Comment #6
sepgil commentedI made new patch that works with the newest dev version of pageroute.
Comment #7
cerup commentedsgilits: I can't figure out how to apply your diff. It doesn't seem to be patching correctly for me as it's creating duplicate references and causing errors. Am I correct in applying this to the pageroute module and not content type? Do I also need the patch at the top too?
Comment #8
sepgil commentedYes, You have to apply the diff on to the pageroute module. Are you using the latest version from the cvs repository(branch DRUPAL-6--1)?
I had to make a new patch, since I made significant changes in pageroute(http://drupal.org/node/560966). I also corrected some coding issues. The new patch will not work until the my pageroute patches are commited...
Comment #9
fagoI think a separate module is a overkill here, let's use a simple include. Best there should be just a content_profile.pageroute.inc. The @file comment should explain what it is for.
* theme_content_profile_empty() should also move in the include and should be named such that it's associated with pageroute. -> theme_content_profile_pageroute... See hook_theme() for how to specify the include there.
The hook implementations can go directly in the .module.
Comment #10
sepgil commentedMerged the to whole module into content profile, so you won't need a separate module.
Comment #11
davej commentedSubscribing and willing to help if I can. I think Content Profile + Pageroute would be very useful for a project I'm currently working on, which must be completed in the next few weeks.
#8 (Sep 14th) mentions significant uncommitted changes in Pageroute. The latest dev release of Pageroute at time of writing is dated Sep 16th - does this contain the required changes? I'm just trying to get clear which versions of Pageroute and Content Profile I need to get and apply which patches to. Or if there are releases in the pipeline and I just need to be patient for a few days, that's cool; an estimate of timescale would be very helpful.
Thanks for your valuable work on these modules.
Dave
Comment #12
davej commentedDon't know how the status field got changed there, changing it back.
Dave
Comment #13
davej commentedI grabbed the latest dev versions of Pageroute and Content Profile (both dated 2009-Sep-16) and applied patch contentprofile_pageroute_003.diff from #10. I got errors like:
Fixed these by changing pageroute.module:
And changing function pageroute_get_types to call pageroute_get_page_class to get $page_class.
I can now add pages of type Content profile display (content_profile) and Content profile editing form (content_profile) to pageroutes. Great.
However Content profile editing form (content_profile) isn't behaving as I would hope. I have two profile node types: profile1 and profile2. (Eventually I'll have six, each with different CCK fields.) I want to use Pageroute to walk the user through adding or editing all their profile nodes. This is the behaviour I currently get, when the user already has profile nodes of each node type:
With "Display submit button" enabled for each Content profile editing form (problems in italics):
(A1) Edit my profile1 node, click Forward
-> takes me to a node edit form with title Profile Part 2 (the title of my profile2 edit page) but displaying the updated content of the profile1 node and not displaying the CCK fields of either profile1 or profile2, with message "Profile Dave's Profile 1 has been updated."
(A2) Click Forward again (no further content changes)
-> takes me to an edit form with title Profile Part 2 and the content of the profile2 node, with message "This content has been modified by another user, changes cannot be saved."
(A3) Edit my profile2 node, click Forward
-> takes me to correct redirect page with message "Profile 2 Dave's Profile 2 has been updated."
With "Display submit button" disabled for each Content profile editing form (problems in italics):
(B1) Edit my profile1 node, click Forward
-> takes me to an edit form with title Profile Part 2 and the content of the profile2 node, no message, changes not saved.
(B2) Edit my profile2 node, click Forward
-> takes me to correct redirect page, no message, changes not saved.
The behaviour I would want, whether or not "Display submit button" is enabled, is:
(C1) Edit my profile1 node, click Forward
-> takes me to an edit form with title Profile Part 2 and the content of the profile2 node, with message "Profile Dave's Profile 1 has been updated."
(C2) Edit my profile2 node, click Forward
-> takes me to correct redirect page with message "Profile 2 Dave's Profile 2 has been updated."
Is the latter the intended behaviour?
Thanks,
Dave
Comment #14
sepgil commentedSorry that I forgot to mention that you'll need the latest patches for pageroute in the patch above....
Anyway, I corrected the issue Dave mentioned(yeah, the third example is the intended behaviour) in this new patch but you'll need the lastet patches for pageroute (especially this one http://drupal.org/node/589958#comment-2090072) or you'll have to wait until they are commited.
Comment #15
davej commented@sgilits: thanks for confirming the intended behaviour and for the new patch. Starting from pageroute-6.x-1.x-dev 2009-Sep-16, I applied the following patches:
I then applied contentprofile_pageroute_004.diff to content_profile-6.x-1.x-dev 2009-Sep-16 . I tested both adding and editing profile nodes, both with and without the Submit button enabled and found that it all works as desired. Thank you, good work!
Dave
Comment #16
davej commentedJust spotted that, using the versions as at #15, the normal node adding form doesn't create a node when you hit the Forward button, unless "Display submit button" is enabled. Shall I create a new issue for this?
Dave
Comment #17
fagook, fine that it's working now.
Can we can name include .pageroute.inc so it's clearer for what module the integration is?
If the class has to be ContentProfilePageRouteEditProfile then, I think that's fine.
Please always look out for the Code-style: -> function getForm has a wrong indentation.
* content_profile_empty -> please add pageroue to the prefix, this it's clear where it belongs to. E.g. content_profile_pageroute_empty. Also you specify the include file in hook_theme.
* if ($node == NULL) {
usually we use !isset($node) to do that. but !empty($node) might be even better in that case.
Comment #18
fagoComment #19
fago@#16: yep please open a separate issue in the pageroute queue.
Comment #20
sepgil commentedfixed all Issues mentioned by fago
Comment #21
BleuBiRTH commentedFirst of all thanks for the hard work! @fago is or will this patch be integrated with the new dev version of content profile?
If i understand correctly you have to apply all the above patches in sequence to see the result of your work? For a newbee like me, it would be great if you could describe the sequence in wich you have to apply the patches, starting from latest official release from both modules.
Comment #22
davej commented@BleuBiRTH: I believe the pageroute patches that I mention at #15 have been committed and are in pageroute-6.x-1.0-beta4 and the latest dev version. Either of these should be fine, I'm using beta4 successfully.
content_profile has been updated less frequently so I've been using a patched version of content_profile-6.x-1.x-dev dated 2009-09-16.
I see there's a new dev version dated 2009-Nov-04: I've just grabbed that and I see its version of content_profile.module is dated Aug 5, so looks as though it doesn't have the above patch contentprofile_pageroute_005.diff . contentprofile_pageroute_005.diff supersedes the previous versions of the patch, you don't need to apply them all. I'd suggest using the latest dev version and applying contentprofile_pageroute_005.diff . I've just tried this, the patch applies cleanly and seems to work.
All the best,
Dave
Comment #23
Bilmar commentedI will be trying the patch this weekend and would like to help with any testing in the future.
Thanks for the great work!
Comment #24
adpo commentedI cannot apply contentprofile_pageroute_005.diff patch because of the following error: Could not open the file \dev\null
Comment #25
fagoHm, the theme function definition in hook_theme() wasn't updated and missed the include file. Also correcty coding style (indention) of ContentProfilePageEditProfile::getform(). To move on I corrected this and committed the patch.
Please test whether the version in CVS is working right now and reopen if not.
Comment #26
tim.plunkettWSOD after updating:
Fatal error: Class 'PageroutePageEdit' not found in sites/all/modules/DRUPAL-6--1/content_profile-DRUPAL-6--1/content_profile.pageroute.inc on line 23
Comment #27
rbrandon commentedYou are recieving this error because the pageroute module is not enabled in your install. Content Profile needs to add the dependency to pageroute and assure that the update path works. I had this same issue.
--Richard
Comment #28
Mark_Watson27 commentedI added a check to see if the pageroute module existe to the
content_profile.pageroute.incfile, i.e.Comment #29
sepgil commentedI think the check would fit better in the function content_profile_theme().
I made a new patch for the issue.
Comment #30
fagoOps, the theme registry includes the file during rebuild. Thanks for the quick fix, committed. Of course with module_exists() instead of $module_exists ;)