Closed (fixed)
Project:
Entity Browser
Version:
8.x-1.x-dev
Component:
Display plugins
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 Feb 2017 at 14:51 UTC
Updated:
14 Dec 2017 at 08:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
erik seifert commentedComment #3
zerolab commentedThis does nothing, Did you mean
$height = $this->configuration['height'] - 90?Comment #4
erik seifert commentedUpdated patch file.
Comment #5
slashrsm commentedConfiguration form only allowed numerical values for width/height so the configuration value that is causing problems probably comes from some other source. Could you share the config yaml of the entity browser that is causing problems?
Comment #6
erik seifert commentedIt seems to be form an older version of entity browser allowed non numeric values. So we had non numeric values in our feature export. Could be closed.
Comment #7
tstoecklerSince #2684989: Entity Browser Responsive Modal Dialog you can actually leave the height and width configuration empty, which will lead to
''(an empty string) being saved as the configuration value. The configuration schema for height and width also usesstringas its type. In this case PHP then yields the error mentioned above, when doing'' - 90.Comment #8
sylvainm commentedWith attached patch, I solve the warning
Comment #9
glass.dimly commentedThe patch in #8 cannot work for the error I have, which is on line 119, and the patch comes later in the code.
This is much simpler and has fixed the issue for me.
Comment #10
sylvainm commented@glass.dimly: I don't think it is a good idea, because if the height is not filled in in configuration, the height attribute will be negative
Comment #11
zerolab commented@SylvainM -- similarly, for #8, it needs a check that
$this->configuration['height']is not less than 90 ;)Otherwise, #8 LGTM
Comment #12
sylvainm commentedDamned! ;-)
This is fixed with attached patch.
I added another check (is_numeric) because someone could try with percentages
Comment #13
sylvainm commentedComment #14
brian-c commentedPatch #12 LGTM.
Comment #15
Anonymous (not verified) commentedTested patch #12, works fine, allows me to add images to nodes again.
Comment #16
merilainen commentedWorks as advertised.
Comment #17
slashrsm commentedFixed formatting as per https://www.drupal.org/docs/develop/standards/coding-standards#linelength
Comment #20
slashrsm commentedTest fails are not related, will fix them in a separate issue. Committed.