Hi,

you can't save percent values in the view display mode. If you try to save something like '100%' the percent sign will be dropped.
Maybe its because you set with issue #2859165: Missing schema file

    iframe_height:
      type: integer
      label: 'Height of embedded map'
    iframe_width:
      type: integer
      label: 'Width of embedded map'

to integer and now you can only save integer values with represent px values.

CommentFileSizeAuthor
#6 2878989.patch575 bytesjhodgdon

Comments

mvogel created an issue. See original summary.

gdelver@xs4all.nl’s picture

Same problem here... Did work in a previous version. Need a fix for that please...
Thanks, Guido

martin107’s picture

Just digging up a discussion

https://www.drupal.org/node/2624838

#5 and #6 to me are the relevant comments

It looks like we have accidently backtracked on something previously agreed.

From #6

I don't think this module has to be too smart about validation. This is a setting that is generally only done by admins. If they want to set the iframe width/height to something that browsers will not render properly for their site, that is their problem, not the module's problem, IMO.

Just trying to be helpful current work around is to revert to 8.x-1.3
and I am linking to the issue that broke things.

jhodgdon’s picture

The schema does indeed need to be changed. Good catch! Let's get a patch...

jhodgdon’s picture

Priority: Normal » Major
jhodgdon’s picture

Status: Active » Needs review
StatusFileSize
new575 bytes

These two settings should be 'string' (not-translatable text) rather than 'integer'. Here is a patch... needs review/test.

Things to test:

a) Works in an existing 8.x site that had the latest code installed (allows you to now save iframe width/height with % in it) without the need for an update function. I don't think we need one, because Drupal should just pick up the new schema. Hopefully.

b) Works in a new installation of 8.x.

See #2543032: Steps to manually test the module. for testing steps.

mvogel’s picture

I tested the patch.

a) works for me on my current site with Drupal 8.3.2, no need for an update function.
b) I tested it with a new installation on simplytest.me with Drupal 8.3.2 without any problems. Percent values are allowed to save now.

thanks for the quick patch

pepegarciag’s picture

Tested the patch on a existing Drupal 8.3.2 installation and it works fine.

jhodgdon’s picture

Thanks for the testing!

joelstein’s picture

Status: Needs review » Reviewed & tested by the community

Works great! Thanks for the patch.

  • martin107 committed 48fb43a on 8.x-1.x authored by jhodgdon
    Issue #2878989 by jhodgdon: iframe_width and height don't accept percent...
martin107’s picture

Status: Reviewed & tested by the community » Fixed

Thank you everyone.

Status: Fixed » Closed (fixed)

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