Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mimetype icon problem for Plone 4 when there is no icon defined. #91

Merged
merged 1 commit into from Jan 14, 2020

Conversation

@jone
Copy link
Member

jone commented Jan 14, 2020

The icon wrapper was recently extended to also support catalog's mime_type metadata.
But the mime_type metadata was introduced with Plone 5 and is not available with Plone 4.
That's why we need a fallback which does not wrap getImage.

These cases are now implemented:

  • when getIcon is set, use the URL in the CatalogBrainContentIcon image tag
  • use brain.mime_type (only Plone 5)
  • fallback to wrapper (Plone 4 without getIcon).

I couldn't write a realiable test though. I think it depends on the Plone 4 minor version wether it is reproducible. Tests of other packages are failing at the moment because of that problem and will recover, proving that this solution works.

@jone jone requested a review from 4teamwork/plone Jan 14, 2020
@jone jone force-pushed the jone-fix-plone4-no-icon branch from e121396 to 76528e2 Jan 14, 2020
Copy link

djowett-ftw left a comment

Okey doke..... LGTM let's give it a spin and see what happens in the wider tests!

@jone jone merged commit 92ca1c9 into master Jan 14, 2020
2 checks passed
2 checks passed
CI Governor: test-plone-4.3.x.cfg Task #496580 succeeded
Details
CI Governor: test-plone-5.1.x.cfg Task #496581 succeeded
Details
@jone jone deleted the jone-fix-plone4-no-icon branch Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.