Hi,

I have been struggling with the 'Image Attach' sub-module for a while (cf. #1572410: Change Image Attach file selection into autocomplete) and was used to toggle between enabling and disabling image attachments at ./admin/settings/image/image_attach. As of today, this does not work anymore on one site.

When I try to enable image attachments, I get the red error message: Validation error, please try again. If this error persists, please contact the site administrator. (localized string: Bei der Gültigkeitsüberprüfung ist ein Fehler aufgetreten, bitte erneut versuchen. Falls der Fehler fortbesteht, wenden Sie sich bitte an den Administrator der Website.).

Currently this happens only on one site; amount of Image nodes on this site: 14,810; no system or module updates were made in the last couple of days, the error directly correlated with uploading images and probably happens when a certain amount of image nodes is reached.

According to the Priority guidelines I'm marking this issue as "major". However, since most of my sites are centered around attached images (more or less every node has one attached image, and attached images are heavily used in Vides to identify content), for me this is de facto critical as it makes it impossible to properly work with the affected site.

Please advise if there is something I can do to make the site usable again.

Thank you!

Comments

joachim’s picture

Status: Active » Postponed (maintainer needs more info)

Can you do some debugging in Form API to figure out what's causing the error message?

asb’s picture

I'm very sorry, but I can't offer any help with code. If I could, I probably would try to rewrite 'Image Attach' myself from scratch as it bites me all day long on image-heavy sites with other issues as well.

Currently I can't suggest any fesible approach how to deal with issues like this; I'm aware that attempts to reproduce them with synthetic data are pretty wasteful, and instructions for non-programmers how to debug Form API are probably not very purposeful.

Side note: On another site, I have currently 26,023 image nodes and did not yet encounter the mentioned validation error. So it's probably no at simple as a hard limit on the amount of image nodes :(

joachim’s picture

Category: bug » support
Priority: Major » Normal
Status: Postponed (maintainer needs more info) » Fixed

> I'm very sorry, but I can't offer any help with code

The kind of debugging I am after really isn't rocket science:

1. Find where in the code outputs that error message. It's includes/form.inc.
2. Open the file.
3. Chuck in some dsm() statements for any variables that look like they might be relevant.
4. Run in and see the debug output.

I can save you even that effort by telling you this is likely nothing to do with Image attach:

  if (isset($form['#token'])) {
    if (!drupal_valid_token($form_state['values']['form_token'], $form['#token'])) {

It's a form token problem. That points to some deeper issue with FormAPI and possibly your server configuration -- try googling the error message for possible fixes to try.

asb’s picture

Status: Fixed » Closed (won't fix)

Thank you for the reply. I take from your answer that the issue with 'Image Attach' might indicate another issue somewhere else that won't be fixed within 'Image Attach' and can not be fixed elsewhere without programming knowledge about "deeper issues with FormAPI", so this is a "won't fix" in regard to to initial issue.

joachim’s picture

There's something wacky going on in your particular install to do with form API, and you need a developer to fix it, yes :)