Validation error during file uploads with CCK fieldgroup tabs enabled

sourabh.iitm - February 6, 2009 - 15:46
Project:CCK Fieldgroup Tabs
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

Hi,
I am getting the following error line in this module when i am trying to upload file in any content type with CCK fieldgroup tabs enabled.I am using drupal 6.9. I have attached a screen shot of the error for the reference.

Validation error, please try again. If the error persists please contact the site administration.

I dont have any error after removing this module. Any idea about this?

AttachmentSize
error details.jpg28.89 KB

#1

phils-okc - March 17, 2009 - 14:58

I'm experiencing the same issue. Only started after I enabled some Image modules (imagecache, imageapi, image, imageassist, and teaserthumbnail). All the latest version as of 3-17-09.

#2

igorik - March 17, 2009 - 21:45

Currently it could be problem of new filefield or imagefield module (do you have the latest dev versions of these modules?)

http://drupal.org/node/402860

#3

phils-okc - March 19, 2009 - 15:55

I don't have either of those installed.

#4

phils-okc - March 20, 2009 - 15:26

I updated cck today and the problem seems to have gone away.

Thanks

#5

phils-okc - March 20, 2009 - 15:38

Ok, now I'm really confused. It broke again and with no changes to my site at all. Just went to upload a file in exactly the same way in the same node and no luck. Same error.

#6

phils-okc - March 20, 2009 - 15:45

Ok, the upload system seams to work if I don't have any tabs enabled on the input form. It is working fine with tabs enabled on the Node view.

I don't know if this is related but when I try to upload an image through "attached images" I get the following error:

warning: array_shift() [function.array-shift]: The argument should be an array in /Applications/MAMP/htdocs/drupal/includes/form.inc on line 1323.

Hope this helps

#7

NToronto - August 12, 2009 - 21:27
Priority:normal» critical

Possible workaround:

There seems to be a conflict between CCK Fieldgroup Tabs and file uploads.
I have a custom content type called "Document". CCK Fieldgroup tabs are enabled as are file uploads. When attempting to upload files I receive the same error: "Validation error, please try again. If the error persists please contact the site administration."

The error message is coming from upload.module line 571.
http://api.drupal.org/api/function/upload_js/6

I must first click "Edit" on the Document I want to edit before I am able to attach a file. It is ok to use CCK Fieldgroup Tabs in the *display* of the document, but when *editing* the Document, CCK Fieldgroup Tabs can not be used or they will interfere with the file upload and cause the validation error.

The workaround until the bug is fixed, is to simply not use CCK Fieldgroup Tabs while editing the document.

1. Open the Content Types admin page (/admin/content/types).
2. Beside the content type you want to edit, click on "Manage Fields".
3. Beside the field(s) which are set to use tabs, click on "Configure".
4. The settings say, "These settings apply to the group in the node editing form." Select a style other then tabs.
5. Repeat this step for all fields which are set to use tabs.
6. Save your changes.

Now when you are viewing your CCK content type, you will still have tabs. But while editing your CCK content type, your fields will not be using tabs. This will prevent the tabs+file upload conflict during editing.

#8

nedjo - August 19, 2009 - 06:25
Status:active» fixed

Moving the tabs rendering to the pre_render stage seems to have solved this issue.

#9

NToronto - August 21, 2009 - 15:43

Hi nedjo,

Could you please expand on your solution? Is this fixed in the August 19th 6.x-1.0 release or the Aug 20th 6.x-1.x-dev release?

Thanks!

#10

nedjo - August 21, 2009 - 16:04

To explain a bit more, previously we were converting the form to tabs at the form_alter stage, meaning that the structure of the form itself was altered. As a result, other modules expecting their fields to be in a particular structure generated errors.

Now we leave the form alone until we're ready to render it--after validation, submission, etc. has happened. Other modules are much happier.

The main change was made in Tabs module, http://drupal.org/project/tabs, which used to use a form element #process callback to prepare tabs and now does so using a #pre_render callback.

All of which is to say: to upgrade, you need to first upgrade Tabs module to the latest stable release and then upgrade to the stable CCK fieldgroup tabs release.

#11

sourabh.iitm - August 21, 2009 - 17:09

Updating tabs module and cck_fieldgroup_tabs module is working. But thr is a new error now. Tab name is not accepting some characters like & , (, ( etc.. That particular tab is having some error in my case.

#12

nedjo - August 21, 2009 - 17:32

#13

sourabh.iitm - August 26, 2009 - 18:22

Got it!! .
Once again i have 2 upgrade tabs module.

#14

System Message - September 9, 2009 - 18:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.