Needs review
Project:
Multistep (D7)
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Jul 2010 at 05:12 UTC
Updated:
3 Nov 2011 at 02:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
chey commentedI like this idea! If I get some time I can take a look.
Comment #2
johnhanley commentedI briefly examined the code in multistep.module and it seems like the messaging could be controlled in hook_nodeapi() using a combination of the $op argument and $node->op property. I didn't have time to experiment, but perhaps the value of $node->op could be compared to the value of the corresponding button string for operations 'insert' or 'update'.
Comment #3
johnhanley commentedThe following snippet (when inserted into a hook_nodeapi function) will suppress the "...has been updated." message displayed after clicking the next or back buttons. The message will, however, correctly display after clicking the "Finish" button.
I chose to insert the code in a custom module, but alternately it could be inserted into multistep.module starting at line 191 (if the maintainer finds it useful.)
Comment #4
tobiberlinAs I have not the needed experience in PHP / Drupal programming - how exactly has the function to be named in a custom module? In 6.x-1.5 version of this module line 191 is a function for the multistep menu block and I think that the above function might not be placed there?!
Comment #5
johnhanley commentedYeah, I wouldn't recommend modifying (hacking) the module directly. That comment was intended for the maintainer.
Anyway, you'll need to read-up on how to create a custom module (it's pretty straightforward) and insert the following code:
Comment #6
franzsubscribe, works as it is stated.
Comment #7
franzMarking as needs review. Patch attached as suggested by Bacteria Man on #3.
Comment #8
franz@tobiberlin, I think it was meant to be on line 292, actually.
Comment #9
dealancer commentedI have issues with that. Error messages does not displayed on user registration page if content profile field are shown there. Investigating the problem.
Comment #10
dealancer commentedPatch clears any messages except status, so I have rewrote it a bit. I have used
instead of
So now it looks like this
Comment #11
franzUpdated patch with correction by dealancer.
Comment #12
chinita7 commentedI tried the patch #11
I have 3 steps and it works on node editing page but works only partly on node creation page.
On node creation page when clicking the next button on the first step (to go to the second step) still show the message but the message is gone when clicking the next button on the second step (to go to the third step)
Comment #13
chinita7 commentedI tried also #7 but it was the same.
Comment #14
chinita7 commentedI just realized that the message showing when clicking the next button on the first step to go to the second step on node creation page is "...has been created" but not "...has been updated"
Yes.. of cores the node has been not just updated but just created..
I wish I could hide this "...has been created" message as well until user click the save button on the last step.
Comment #15
johnhanley commentedI don't have time to do so at the moment, but it should be super easy to add in another condition to suppress the "created" message as well.
Comment #16
chinita7 commentedIn the mean time I will hide it by disable message module.
Only the thing is that on the last step the message says "updated" instead of "created" as the node is created on the first step.
Anyway it's not a really big deal for me so my problem was basically solved. Thanks for the code.