Multistep is not working with content profile module. I just want to create a multi step user registration. i have enabled multi step in content profile content type. but when i go to use registration page i dont get the multi step process.

Looking for this features. Searched every where but couldnt find a solution. Help Please.

Comments

vkareh’s picture

Title: Not workig with content profile module » Not working with Content Profile module
Issue tags: +content profile, +redirect, +multistep

Content Profile uses internal redirections to map the nodes to the user profile, for example user/3/edit/profile instead of node/50/edit. This conflicts with the way Multistep is supposed to work, where each submission will redirect you to the next step as such: node/50/edit/1 --> node/50/edit/2.

I've tried, but I haven't yet found a way to override Content Profile's redirection. Using arguments (user/3/edit/profile/1) will return a Page Not Found error.

If anyone finds a way, please let me know.

maverick14’s picture

I have the same problem here. Now after step one Drupal just saves the content profile node, without going to the next step.

Would be nice if both modules would work together fine.

edward.peters’s picture

I too have this problem, and would be very grateful for a solution, as the Multistep module is outstandingly useful.

drupalprojects’s picture

Component: Miscellaneous » Code
Assigned: Unassigned » drupalprojects
Status: Active » Needs review
StatusFileSize
new1.94 KB
drupalprojects’s picture

Please, review the patch
Thanks for good module.

alxsvdr’s picture

Submitted patch seems interesting. However I couldn't apply it to version 6.x-1.3.

drupalprojects’s picture

StatusFileSize
new2.23 KB

Wrong patch. Apply patch from #8 comment

drupalprojects’s picture

StatusFileSize
new2.23 KB
alxsvdr’s picture

Dear drupalprojects,

Your submitted patch works nicely. I'm just experiencing some trouble when I click on "View entire form" option, which is not displaying any form. Otherwise it's doing it's job.

Thanks a lot!

A. Saavedra

drupalprojects’s picture

I don't need "View entire form" option so I didn't tested my code with it, sorry :(

vkareh’s picture

Version: 6.x-1.3 » 6.x-1.x-dev
StatusFileSize
new3.5 KB

drupalprojects: Your patch works wonderfully! Thanks a lot for your hard work!

For the record, I used Content Profile 6.x-1.0-beta4 along with the latest development snapshot of Multistep.

I moved a few things around, placed a few is_content_profile() checks to make sure that you are editing a profile node, and fixed the "View entire form" issue. Also added a redirection at the end of the form so that when you click "Done", it will bring you back to user/$uid instead of node/$nid.

Please test and let me know if any issues come up!

drupalprojects’s picture

I haven't applied your patch, vkareh.
But I think I found small bug. take a look at my comment in the code below

if (module_exists('content_profile') && is_content_profile($type)) {
+      global $user;
+      $form_state['redirect'] = 'user/' . $user->uid . '/profile/' . $type . '/' . $goto_step; // <--- we are missing $_REQUEST['redirect'] here I think
+    }
+    else {
+      $form_state['redirect'] = array('node/' . $nid . '/edit/' . $goto_step, (isset($_REQUEST['redirect']) ? array('redirect' => $_REQUEST['redirect']) : array()));
+    }

vkareh’s picture

Good catch, but we might not need to change it, since Content Profile itself doesn't respect $_GET['destination'].

$_REQUEST['redirect'] is my own little hacked version of $_REQUEST['destination'] (or $_GET['destination']) but it only redirects after clicking Done on the last step, as opposed to redirecting right after any Save.

The way content_profile works is by redirecting to either user/$uid or to whatever was on $_GET['q'], depending on the URL arguments. No consideration is made for $_GET['destination']:

 // content_profile.module - line 276
$form['#redirect'] = arg(2) == 'profile' ? 'user/'. $form['#node']->uid : $_GET['q'];

except when editing a profile node through node/$nid/edit, in which the destination parameter is set to return to user/$uid:

 // content_profile.module - line 381
drupal_goto('node/'. $nid .'/edit', 'destination=user/'. $node->uid);

but we already do that here:

 // multistep-542498.patch
$form_state['redirect'] = 'user/' . $user->uid;

so there is no need to use $_REQUEST['redirect'], unless we want to fix how content_profile works. But then, this is just my opinion based on my interpretation of how content_profile works. Feel free to verify if any of this makes sense :P

Note: code was taken from Content Profile 6.x-1.0-beta4

drupalprojects’s picture

/me need to redirect users to $_REQUEST['destination'] after profile completeness
So +1 from me to have this feature.

drupalprojects’s picture

actually it would be nice to have an configuration option to enable/disable redirection to $_REQUEST['destination']

vkareh’s picture

It would be a nice feature. However, there are other modules that do that:

Although I don't know how well they would integrate with Multistep+Content Profile (that should be a separate issue thread).

The feature for enabling/disabling $_REQUEST['destination'] should also be a separate issue, although that is usually controlled from the module that creates the destination request in the first place (typically Views), so it's likely that there is no need for it. Multistep just tries to respect other modules' destination request by deferring it to the end of the form.

vkareh’s picture

Status: Needs review » Fixed

I just committed the patch into the development snapshot. Multistep now works with Content Profile. Thanks!

Status: Fixed » Closed (fixed)

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

maverick14’s picture

Cool!

mohanrajthangarasu’s picture

Sorry for the late reply. I havent tested your patch that you created a solution for my issue. i will check it out and get back to you.

vkareh & drupalprojects , Thanks a lot for your great effort.

kone23’s picture

Hi Vkareh,

Thank you for the module. I would also like to use it with content profile. I downloaded the dev snapshot but could not have it work with Content Profile. Am I missing something ?
Do I still have to apply the patch ? What version of CP am I supposed to use ?

Thank you for your support,

Nicolas

jthomasbailey’s picture

you have to put the content profile fields in a field group or they don't show up in Multistep

EDIT: and under group configuration change the Multistep settings

muschpusch’s picture

@hobgobbler: I made different groups and assigned them two different steps but no multi-step form is appearing. I checked dsm() of the page and the extra buttons are in the array but aren't shown either. The second step is just missing..

benone’s picture

+1
the same here.
No multistep on register.

muschpusch’s picture

Assigned: drupalprojects » muschpusch
Status: Closed (fixed) » Needs work

I found a few bugs in multistep thanks to Robin van Emden. Multistip will at this moment only work for logged in users who edit their profile. I will try to make a patch file in the next days.

Balbo’s picture

Should the patch be applied with the current version of multistep (6.x-1.4)?

Since, I created group for cck-field in a "content profile type". Assigned different step to the groups. But when doing a registration, only the first step is shown.

(If then I use the edit tab in profile page I can find all the steps)
Thanks

muschpusch’s picture

I have a deadline for 1. april and the patch has to wait unless someone else will do it.

Hadrien KOHL’s picture

Hi muschpusch, I do also need this functionality. Do you have some clue about what have to be done in order to allow multi step registration process ?

muschpusch’s picture

StatusFileSize
new1.74 KB

He Hadrien... I started fixing things but i have to finish a different projects the next couple of days. I attached a first patch with some modifications but it's NOT finished. If you want to help have a look!

regards Volkan

muschpusch’s picture

Version: 6.x-1.x-dev » 6.x-1.4
StatusFileSize
new2.3 KB

I created a second patch for integrating multistep into content_profile. It does the job but there are some limitations:

- previous button does not work when having required fields.
- multistep saves every step. This breaks rules compatibility (after node is saved) :( Could one of the developers have a look at this. I'm new to drupal and i don't have the time and resources to fix this.

My second drupal patch have fun with it :)

muschpusch’s picture

Status: Needs work » Needs review

forgot to change the status...

muschpusch’s picture

I don't have the time to finish this. Is there someone else who is more familiar with content_profile? I'm would pay a small amount for the modifications. Maybe some other folks too?

francewhoa’s picture

I just open the following related feature request #813418: Support for anonymous users in 7.x-1.x version. I'm not a coder so I can't tell if this is a duplicate. It doesn't involve Content Profile module so I opened a new feature request.

smk-ka’s picture

Status: Needs review » Needs work

Just a quick note: the multistep navigation block is currently also not Content Profile aware. I think to ease development the URL handling needs to be globally abstracted out into their own functions to avoid repeating the same code over and over again:

  • multistep_is_node_form() (names are debatable) should check whether we're on a node form (one of node/add/TYPE, node/ID/edit, user/UID/profile/TYPE) and return a "context" (however that should look like, probably the node object plus the detected url type)
  • multistep_url() should take the context information and generate the correct base url from it (same list as above) and append additional $step etc.
muschpusch’s picture

I checked the new dev release and some notes to myself and other interested.... On the registration pages the (next and so on) buttons are created by multistep but seem to be deleted later. In the function multistep_submit $type is empty so redirecting fails to the next page fails...

Oh... lazy temporary fix for displaying the buttons set them to buttons2


 if ($step < variable_get('multistep_steps_' . $type, 0) && $step != 0) {
    $form['buttons2']['next'] = array(
      '#type' => 'submit',
      '#value' => variable_get('multistep_button_next', 'Next >'),
      '#submit' => array('multistep_next'),
      '#weight' => 103,
    );  

and by the way the new dev code looks nice :)

patmacs’s picture

Subscribing

realityloop’s picture

I'm using 6x-1.5 of Multistep but it doesn't appear to work with Content Profile still, I don't get any buttons to proceed to the next step of the form, and can't complete my submission as there are required fields on 2nds and third step.

Is this still in development?

muschpusch’s picture

Assigned: muschpusch » Unassigned

I didn't get it working and switched to a combination of rules, flags & content profile. I would be glad if someone else can have a look at this issue.

ashedryden’s picture

Also attempted to use this with content profile (with the current stable and dev). All fields just show up on one page.

realityloop’s picture

muschpusch: could you possibly give a more detailed description of your solution please?

rhymeswithcamera’s picture

subscribing

muschpusch’s picture

@realityloop: would be off topic here. I will send you a message...

hongpong’s picture

Subscribe

bitradiator’s picture

Subscribe

YK85’s picture

Subscribing - I was wondering if there may have been any development with compatibility with content profile module? Thank you!

hongpong’s picture

Passing along a kinda-related fix i didnt come up with - Here's a useful tweak you might want to try for stuff like this:
in line 145:
elseif (arg(0) == 'user' && is_numeric(arg(1)) && arg(2) == 'edit' && !is_numeric(arg(3))) {

If you drop out the is_numeric(arg(1)) then the module's autogenerated block shows up correctly if you are trying to work with the "me aliases" module, multistep and content_profile. Otherwise wherever "me" is going on the path you can't get the block to appear... cause the URL ain't numeric!!

bostonlatin’s picture

Subscribe

vkareh’s picture

Version: 6.x-1.4 » 6.x-1.x-dev
Status: Needs work » Needs review

http://drupal.org/cvs?commit=487516

I just committed changes to the dev snapshot that might make Multistep work with Content Profile during registration. It's very much experimental code and it needs tons of testing. I don't think any release will look at all like this (I'm using a horrible drupal_goto() inside hook_nodeapi()), but it's a start.

Please test and report! I'll be playing with it throughout the afternoon and report my findings as well.

To test today, check it out from CVS (http://drupal.org/node/347291/cvs-instructions/DRUPAL-6--1). Or else, wait until tomorrow for the dev snapshot tarball.

bostonlatin’s picture

I tested the new dev version but the user registration page didn't change :( I only see a "Create Account" button yet no "Next" link from Multistep. My goal is to brake down the actual registration page into 3 or 4 pages so that it becomes more user friendly.

Multistep does work once logged in though, however, user would need to access "My Account" then click "Edit" and then "Content_profile_name" in order to access the Mutistep form. If anyone has any suggestions please let me know.

Thank you

vkareh’s picture

Forgot to mention, the way it's doing it is by redirecting to the node once they click on Create Account...

aaron.r.carlton’s picture

subscribe

Drupal_Bengaluru’s picture

Rules can be used - to redirect a user, who does not have a profile, to the appropriate create content profile node.

rdiazjokyo’s picture

subscribe

lesleyfernandes’s picture

subscripe

myregistration’s picture

subscribe

hanmant.sapkal’s picture

I applied patch #8 but not worked for me. Use-case and Issue is as bellow

I want to make the user registration page a multi page user regustration form (Of two pages).
For this I have used content_profile and multistep modules.
In the Edit Content_profile form, I have enabled the multistep option and set the number of steps to 2.
Now, with the help of Manage fields I have added two fields to the user registration form.
1. Full name. In fullname I have selected it to be present in the first step.
2. Address. In Address I have selected it to be present in the second step.
But, in the user registration form only the "full name" is showing up, and neither the "address field" is nor the "next" button is showing up.

Any help is appreciated.