Closed (fixed)
Project:
iFrame Resizer
Version:
2.x-dev
Component:
Documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Nov 2024 at 11:21 UTC
Updated:
26 Feb 2026 at 11:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
niharika.s commentedComment #3
niharika.s commentedI have successfully installed the drupal/iframe_resizer package 2.0.4 version, and it should now support our project requirements. If there are any changes needed or further updates required, please review and let me know.
Comment #4
niharika.s commentedComment #5
drupalfan2 commentedcomposer require "drupal/iframe_resizer:2.0.4"
Comment #6
drupalfan2 commentedComment #7
anybodyDocumentation should be added to the frontpage and README.md how to install the dependency using asset-packagist and instead of require we should just suggest the bower-asset? As an alternative to manual installation.
Please note that npm-asset has a different folder structure! So we should keep bower-asset. On the other hand the version ends with ^4 there while ^5 is latest. That should maybe be a follow-up?
Comment #8
logeshvaran commentedHi,
I added the code below to composer.json, and the bower-asset package was downloaded successfully when I ran the composer require drupal/iframe_resizer command.
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
]
Kindly try this if you encounter this issue.
Comment #9
grevil commentedYea sorry, not very best practice to directly require a library where an external repository has to be added first...
I'll adjust it accordingly, thanks.
Comment #10
grevil commentedAll done, should be clearer now.
Comment #12
grevil commentedComment #13
anybodyWell done @grevil!
Comment #15
anybodyComment #17
sirclickalotI have be using the IFrame Resizer module now for a number of years now.
I am have just updated my site with...
composer require "drupal/iframe_resizer:^2.0"... and this happened....
The library go deleted!
I'd appreciate anyone's insights here!
Thank you
Double checking
I have fully uninstalled the module, removed the package using composer, cleared composer caches, and reinstalled using composer from scratch but no JS brought it.
Clarification
For clarity, the
repositoriessection of mycomposer.json is...Other modules that require libraries from either perform as expected and bring down / update their assets libraries, for example (from my
composer.json...And I note that the last four lines of the
composer.jsonof the module itself contains...So I am expecting:
The
configsection of mycomposer.json is...Finally, I do have...
...rather than
"dev".Comment #18
anybody@sirclickalot: Due to the recent changes please execute:
composer require bower-asset/iframe-resizer: ^4This change was made because requiring an asset-packagist asset in a Drupal module "by hard" is not best practice.
You can also see this additional information in the status report.
Comment #19
sirclickalot@anybody,
But issuing that command that installs
"version": "5.5.9"and the module page still specifically says...That statement if backed up by the fact that my targeted <iframe> elements are no longer being resized :-(
Rolling back to module version 2.0.4 via composer reinstates everything and the my <iframe>s are back to their former glory :-)
Comment #20
grevil commentedSorry @sirclickalot for the inconvenience. I actually did not expect composer to automatically remove packages when they aren't required by modules anymore. (Though this is actually not to bad, but an update message would've helped).
@anybody did not provide the correct version. Please run
composer require bower-asset/iframe-resizer:^4though this is also documented inside the README, the module page and a status message should show up in your drupal status report tab.I'll provide a quick update hook message. So others updating won't get confused.
Comment #21
grevil commentedThis should do the trick:

Comment #22
anybodyThank you, sorry my command was a bit too short and optimistic, I edited my comment. It has to be:
composer require bower-asset/iframe-resizer:^4like in the docs and status report!Comment #23
sirclickalotThanks gents, that does all make sense...
Appears to do what we want nicely in terms of the correcting the asset version but alas, despite multiple
drush crs, and adrush updbupdate for good measure, still no <iframe> resizing with the2.05!Also, no mention in the status report either.
Something weird going on here.
What else can I should I check to help debug this?
Comment #24
grevil commentedHave you cleared the browser cache?
Comment #25
sirclickalotYes, multiple times.
Even tried closing down the stack and restarting as I sometimes suspect other layers of caching too but whatever I try:
Looking in the <head> of the page, the script is being loaded...
Comment #26
sirclickalotOK, I have dug a little deeper and I have an update on #17
I actually have two versions of my website:
1) A local DEV version in Drupal 11.3.3 (the one I have been discussing thus far)
2) The current live one still in Drupal 10.6.3
I can now confirm that with the combination of the latest module (2.0.6) and the library (4.4.5):
1) The Drupal 10 site works perfectly, you can see a live instance of it action here (the '6502 Assembler' section): https://bit-by-bit.org/interactive-content/8-bit-cpu-simulator
2) For the Drupal 11 site, the situation is as described in #17 - no resizing.
As with #17 I have confirmed that in both cases the library is being loaded on the page <head>.
There is no mention of Iframe Resizer in any form on either site's Status report page - I am beginning to wonder whether I have misread your earlier statements saying that there should be something there?
To reiterate, rolling back to previous module version via composer on the Drupal 10 site, and all is well again; this really does seem to point the finger at the D11/latest module combo to me.
Comment #27
anybody@sirclickalot I was wrong regarding the message in the status report. Currently it's implemented in the way that no message appears if anything is fine and the library is present. I thought it was different, but that won't change things.
I just tried the upgrade in all our projects where we use iframe_resizer and it works flawlessly.
You can either downgrade to a previous version (shouldn't do any harm) or debug the latest module js in your installation to find out why it doesn't run in your specific case, but I can confirm it works perfectly, just the information about the manual composer require was missing.
Should you find any bug in the module, please let us know, but my investigations show that it seems to be specific to your installation and not a bug in the module.
What are your settings at
/admin/config/user-interface/iframe_resizer?Do you see any errors in the browser console?
Comment #28
sirclickalotHi @anybody,
Just to be clear, you've tried it in D10 and D11?
Thanks