djangocms-text-ckeditor icon indicating copy to clipboard operation
djangocms-text-ckeditor copied to clipboard

ValueError thrown by render_plugin_preview

Open mpwoodward opened this issue 4 years ago • 1 comments

We've had this happen a number of times but haven't yet been able to get to the bottom of how/why it happens, so I thought I'd file an issue and see if perhaps at a minimum there's a way for this to fail more gracefully. The major issue is that when this situation occurs the page won't even load, so we have to hunt down the offending row in the database and delete it to get things rendering again.

The error message is: ValueError: If object is not a FieldFile or Thumbnailer instance, the relative name must be provided

The ValueError is raised by easy_thumbnails/files.py in get_thumbnailer at line 65, which causes line 25 of render_plugin_preview in djangocms_text_ckeditor_tags.py to blow up.

Relevant package versions:

  • django-cms 3.6.0
  • djangocms-text-ckeditor 3.7.0

Full stacktrace captured by Sentry: djangocms-text-ckeditor-valueerror.txt

Offending database record from our plugin table (tab delimited): offending_plugin_db_row.txt

In this particular case the plugin that broke is a custom plugin that extends djangocms-picture, but typically when this has happened in the past the offending plugin has been the default djangocms-picture, djangocms-file, or djangocms-link within djangocms-text-ckeditor.

Appreciate any ideas you have. Thanks.

mpwoodward avatar May 11 '20 16:05 mpwoodward

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 28 '22 15:07 stale[bot]

This will now be closed due to inactivity, but feel free to reopen it.

stale[bot] avatar Aug 30 '22 17:08 stale[bot]