Posted by BWPanda on October 11, 2009 at 11:29pm
Jump to:
| Project: | Scheduler |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
I'm using Scheduler along with MultiGroup but am having some issues; specifically, when I have Scheduler on a step other then 1 and try to hit Next, I get the following errors:
* The 'publish on' value does not match the expected format of 2009-10-12 10:19:32
* The 'unpublish on' value does not match the expected format of 2009-10-12 10:19:32I'm not sure if this is an issue with Scheduler or MultiGroup, but other modules seems to work ok with MultiGroup, so I thought I'd start here :)
Comments
#1
What is "MultiGroup"? There doesn't seem to be a module with that name...
#2
Oops, my mistake - Multistep: http://drupal.org/project/multistep
All these modules are so confusing...
#3
Do you have date_popup module enabled? If you do then this sounds suspiciously like #579126: Multistep module breaks multi-valued fields. It works fine if the scheduler fieldgroup is in all steps or if date_popup is not enabled. The regular input is only a single value while the date popup uses two seperate values for date and time.
#4
I do have the date_popup module installed. I can confirm that it works when date_popup is disabled and/or when scheduler is set to be displayed on all steps.
However, a patch was released for the multi-valued issue which fixes that, but this problem still occurs.
So, does the problem lie with Scheduler, Date Popup or Multistep?
For now I've set Scheduler to be displayed on all steps, but this is just a temporary workaround while this is being looked into.
#5
Date_Popup could be the issue here... Found another problem on my site whereby disabling date_popup fixes it as well: #604854: Date Popup causing multiple problems
#6
I don't think its a problem on date_popups side. Multistep must be doing something weird with all form elements that are not shown in the current step. I don't know what it is, but scheduler doesn't like it.
#7
From what I understand, Multistep simply sets
#accessto FALSE if the field(group) doesn't belong on the current step...#8
I figured it out. date_popup transforms the two fields into one field during validation so that scheduler only sees the on publish_on/unpublish_on value instead of separate date and time values. When multistep is used and the scheduler field group is not part of the first step, there has not been any validation and therefore no transformation into a single value. Instead of a string publish_on contains an associative array with two empty values names 'date' and 'time'.
The only thing I can do about that, is implementing some Multistep specific validation code. This would be pretty easy but I don't like the idea of having code specific to a module scheduler is not using, but only to circumvent some problem that actually results from the combination of the three modules (scheduler, multistep and date_popup). As said, the change would be easy but I'd rather keep the code clean.
Do you have any sugestions how to deal with this?
I will ask this question in the dev mailing list. There are people smarter then me...
#9
Two possibilities:
1 - Write some generic code (like an API function) that other modules like Multistep can implement to fix the issue (since it seems like their not handling the validation properly)...
2 - Write a patch to fix the issue for those of us experiencing the problem, but don't commit it (link to it from the project page or something), until a better solution is found.
Glad you worked it out!
#10
I will just check if the value is an array instead of a string and let the validation pass if nobody on the devel mailing list comes up with a better solution. I don't like that but that seems to be the easiest way. The only alternative would be to have Date Popup not use the same field names for its virtual widget. But I posted an easy patch for another problem to Date Popup weeks ago and that hasn't even be considered for inclusion, because there are almost 400 open issues for the date module. Also would that change be much more difficult than the change to scheduler.
#11
What ended up happening with this? I'm using Scheduler 6.x-1.6 on my site and am still experiencing this issue (trying to only display the Scheduler settings on the last step).
I can't see any CVS commits relating to this, is there a patch somewhere I need to apply?
#12
This is neither a scheduler nor a multistep issue (it is not even a bug). The solution I proposed in #10 would not work as easy as it seemed. I postpone the issue because I do not currently have time to work on it.
#13
After I posted the message above I thought I'd take a crack at a patch. However, although the patch worked for the first step of the multistep (when the values were an array), subsequent steps didn't. This is because after the first step, once the node has been created, the values change from an array to a string with the date: 01/01/1970.
For now, I've gone back to displaying the scheduler settings on each step.
#14
I am closing this now because there is no hope for the date module. There are 580 open issues but the last commit was 8 weeks ago...