Installation

iFrameResize is not defined

iFrameResize is not defined

by Tural Hamzayev -
Number of replies: 6

Hi,

After Upgrading to WebWork v2.18 in Open Problem Library iframe-resizer.min.js is missing (I get 404 error and instead of iframe of question preview, error messageĀ  iFrameResize is not defined occurs).

I run npm ci in /opt/webwork/webwork2/htdocs, there are no errors, but the file does not reappear.


Thanks!

In reply to Tural Hamzayev

Re: iFrameResize is not defined

by Danny Glin -

Did you run rpm ci in /opt/webwork/pg/htdocs as well?

In reply to Danny Glin

Re: iFrameResize is not defined

by Tural Hamzayev -

Yes, I've ran both, but since iframe-resizer is in webwork folder only, I mentioned that.

In reply to Danny Glin

Re: iFrameResize is not defined

by Glenn Rice -

After running npm ci in both /opt/webwork/webwork2/htdocs and /opt/webwork/pg/htdocs make sure that you restart the webwork2 app with "sudo systemctl restart webwork2" to make the app reload the generated static-assets.json files.

In reply to Glenn Rice

Re: iFrameResize is not defined

by Tural Hamzayev -
Restarting Webwork did not help.
Interestingly iframe-resizer is not present in static-assets.json file.
In reply to Tural Hamzayev

Re: iFrameResize is not defined

by Glenn Rice -
Actually, iframe-resizer should not be in the static-assets.json file. In fact, no third party assets should be in that file. All of the third party assets are in node_modules, and those are served in a different way.

What do you see when you run "git status" in the /opt/webwork/webwork2 directory?
In reply to Glenn Rice

Re: iFrameResize is not defined

by Tural Hamzayev -

Thanks for the tips. git status showed uncommitted change in package.json and package-lock.json. After rolling the changes back and running npm ci again everything started to work.

Thanks for support!