Forgive my submitting two bug reports in as many minutes.
As I said in my previous issue (http://drupal.org/node/347091) I have an event content type and I'm trying to attach a location to it. The CCK field type isn't working (see the other bug report) so I tried the non-CCK Location field which seemed to work except when previewing content.
I have preview turned on and required for my event type content and, when previewing, the Location fields empty themselves.
The data shows up in the preview, but the fields on the form are empty, so when the content is saved, it's saved with those empty fields and therefore loses location information.
Please let me know if there's anything I can try to fix it.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | location_preview_additional.patch | 655 bytes | roderik |
Comments
Comment #1
FoolsRun commentedI can, after testing, confirm that if you don't preview the content, the location is stored correctly. In preview the form fields do not re-populate with the previewed data and therefore, when the form is posted, it's saved with empty location fields.
This is kinda critical, I think.
Comment #2
bdragon commentedHmm, I was just able to reproduce.
Comment #3
bdragon commentedShould be fixed now, in commits http://drupal.org/cvs?commit=159098 thru http://drupal.org/cvs?commit=159101.
I'm not sure whether or not the patch is needed on D5.
Comment #4
yesct commentedno-one seemed to need this for D5, marking fixed.
Comment #6
roderikSeems you forgot to patch the 'hack for the "additional" field' a few lines below.
That still shows empty (and/or 'previous saved value') on preview.
Comment #7
SeanBannister commentedLooks good, I'll commit this soon.
Comment #8
bdragon commentedThis was just fixed in a different way over in #441272: Additional - do not collect doesn't respect setting.
Comment #9
buzzman commentedWith bdragon's commit in #3 and #8 everything worx fine except Location Autocomplete field, which still clears on Preview in Node Edit form (when it already has a value).
For anyone having the same issue and who needs to keep their hair where it's at ;-), how I fixed it in location.module is like this:
and now the autocomplete value happily persists in Preview.
cheers.
Comment #10
buzzman commentedoops, posted too soon!
actually, this needs to be inside a condition like below as otherwise, for new user registration the $obj is blank and that causes the Province to go in with a "" value:
I'm sure there is a better way, but I needed it quick and this worx gr8.
cheers.