We're using Insert along with the File (Field) Paths module. We were seeing a bug where the user would upload an image, click the "Insert" button, but not see the image in the WYSIWYG field. A URL like this was getting inserted:

http://example.com/system/temporary/temporary/filefield_paths/cat-relaxi...

But, that URL was returning a 404 (making it blank in the editor).

The issue for us turned out to be that we had "Fast 404 pages" enabled in our settings.php and that was causing the 404. To fix this, we just needed to update the 404_fast_paths_exclude setting. We changed something like this:

$conf['404_fast_paths_exclude'] = '/\/(?:styles)|(?:system\/files)\//';

To this:

$conf['404_fast_paths_exclude'] = '/\/(?:styles)|(?:system\/(files|temporary))\//';

Maybe it would be useful to make a note about this in the README?

Comments

jrb created an issue. See original summary.

Snater’s picture

Thanks for filing the issue and your suggestion. I am unable to reproduce the issue, even when uncommenting drupal_fast_404() in settings.php. It does not seem to be an issue with standard configuration. The issue would need some more clarification on its cause.
I wonder why your images are stored in the temporary folder, instead of them getting moved to the files folder -- is that done by intention?

jrb’s picture

Were you using the File (Field) Paths module in your test? That module is what's making it use the temporary directory.

  • Snater committed accf72a on 7.x-1.x
    Issue #2929521 by jrb: Possible fix for "Missing image before saving"...
Snater’s picture

Category: Bug report » Task
Status: Active » Fixed

OK, thanks, got it now. Seems the File (Field) Paths module stores unprocessed files in the public folder by default. Changing to the temporary folder (as recommended by the module), triggers the issue. Added some documentation to the Readme file.

Status: Fixed » Closed (fixed)

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