Open Rudd-O opened 2 years ago
I suspect this is related to the imagetransforms changes that have been going on lately.
2022-09-08 00:53:28,984 ERROR [plone.app.textfield:91][waitress-0] Transform exception
Traceback (most recent call last):
File "/home/user/Projects/Rudd-O.com/localserver/buildout-cache/eggs/cp310/plone.app.textfield-1.3.6-py3.10.egg/plone/app/textfield/transform.py", line 57, in __call__
data = transforms.convertTo(
File "/home/user/Projects/Rudd-O.com/localserver/buildout-cache/eggs/cp310/Products.PortalTransforms-3.2.0-py3.10.egg/Products/PortalTransforms/TransformEngine.py", line 172, in convertTo
result = transform.convert(orig, data, context=context,
File "/home/user/Projects/Rudd-O.com/localserver/buildout-cache/eggs/cp310/Products.PortalTransforms-3.2.0-py3.10.egg/Products/PortalTransforms/chain.py", line 49, in convert
data = transform.convert(orig, data, **kwargs)
File "/home/user/Projects/Rudd-O.com/localserver/buildout-cache/eggs/cp310/Products.PortalTransforms-3.2.0-py3.10.egg/Products/PortalTransforms/Transform.py", line 202, in convert
return self._v_transform.convert(*args, **kwargs)
File "/home/user/Projects/Rudd-O.com/localserver/buildout-cache/eggs/cp310/plone.outputfilters-5.0.0b1-py3.10.egg/plone/outputfilters/transforms/html_to_plone_outputfilters_html.py", line 33, in convert
res = apply_filters(filters, orig)
File "/home/user/Projects/Rudd-O.com/localserver/buildout-cache/eggs/cp310/plone.outputfilters-5.0.0b1-py3.10.egg/plone/outputfilters/__init__.py", line 7, in apply_filters
res = filter(data)
File "/home/user/Projects/Rudd-O.com/localserver/buildout-cache/eggs/cp310/plone.outputfilters-5.0.0b1-py3.10.egg/plone/outputfilters/filters/picture_variants.py", line 50, in __call__
elem.replace_with(self.img2picturetag.create_picture_tag(sourceset, elem.attrs))
File "/home/user/Projects/Rudd-O.com/localserver/buildout-cache/eggs/cp310/plone.namedfile-6.0.0b3-py3.10.egg/plone/namedfile/picture.py", line 93, in create_picture_tag
scale_width = self.get_scale_width(scale)
File "/home/user/Projects/Rudd-O.com/localserver/buildout-cache/eggs/cp310/plone.namedfile-6.0.0b3-py3.10.egg/plone/namedfile/picture.py", line 50, in get_scale_width
return scale_info[0]
TypeError: 'NoneType' object is not subscriptable
I wasn't very much wrong about it!
OK. I think it has to do with my policy product overriding the allowed_sizes
image scales, which are not kept in sync with TinyMCE. Let me go back to default and see.
I went back to default and the error persists.
EDIT, no I was missing some scales. Fixed that, boom, site works.
Yep, this image scales thing needs to be documented as a breaking change that policy product creators must revise.
if I edit an article and I upload/embed that image, I get the following traceback:
Deleting the embedded image (TinyMCE edit is not affected) from the article content makes the traceback go away.
I am using Plone 6 beta.