• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Custom button iframe no longer auto resizes to correct height.

danami

Silver Pleskian
TITLE:
Custom button iframe no longer auto resizes to correct height.
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:
Product version: Plesk Onyx 17.9.5
Build date: 2018/08/24 16:00
OS version: CentOS 7.5.1804
Revision: e9a8b33ab2aa446e48a2d368c9282458159e5f73
Architecture: 64-bit
Wrapper version: 1.2
PROBLEM DESCRIPTION:
In all previous Plesk versions when creating a custom button in Plesk with the option "Open URL in Plesk" the iframe that Plesk uses has a function that will automatically resize the iframe height to the size of the child content. In Plesk 17.9.5 the javascript function has been updated and is currently broken.

The new broken function is:

Code:
<script type="text/javascript">
//<![CDATA[
Jsw.onReady(function () {
    var resizeBlocks = function () {
        var bodyHeight = (Prototype.Browser.IE)
            ? document.documentElement.clientHeight
            : document.body.clientHeight;

        var frameHeight = bodyHeight - Element.cumulativeOffset(document.getElementById('frameWrapper'))[1]  - parseInt(document.querySelector('.page-content').style.paddingBottom);
        if (document.querySelector('.page-footer-wrapper')) {
            frameHeight -= Element.getHeight(document.querySelector('.page-footer-wrapper'));
        }

        document.getElementById('pageIframe').style.height = frameHeight + 'px';
    };

    resizeBlocks();
    window.addEventListener('resize', resizeBlocks);
});
//]]>
</script>

The previous one that worked:
Code:
<script type="text/javascript">
//<![CDATA[

Jsw.namespace('Smb.Views.CustomButtons');

Smb.Views.CustomButtons.resizeBlocks = function() {
    var bodyHeight = (Prototype.Browser.IE)
        ? document.documentElement.clientHeight
        : document.body.clientHeight;

    var frameHeight = bodyHeight - $('frameWrapper').cumulativeOffset()[1]  - parseInt($$('.page-content')[0].getStyle('paddingBottom'));
    if ($$('.page-footer-wrapper').first()) {
        frameHeight -= $$('.page-footer-wrapper').first().getHeight();
    }

    $('pageIframe').setStyle({ 'height': frameHeight + 'px' });
};

Jsw.onReady(function() {
    Smb.Views.CustomButtons.resizeBlocks();
    Event.observe(window, 'resize', Smb.Views.CustomButtons.resizeBlocks, false);
});
//]]>
</script>
STEPS TO REPRODUCE:
1. Create the file /usr/local/psa/admin/htdocs/test.html with the following code:
HTML:
<html>
1<br/>
2<br/>
3<br/>
4<br/>
5<br/>
6<br/>
7<br/>
8<br/>
9<br/>
10<br/>
11<br/>
12<br/>
13<br/>
14<br/>
15<br/>
16<br/>
17<br/>
18<br/>
19<br/>
20<br/>
21<br/>
22<br/>
23<br/>
24<br/>
25<br/>
</html>

2. Go To Tools and Settings -> Custom Buttons. Add the custom button with:
Button label: test
Location: common access
URL: /test.html
Open URL in Plesk: checked.

3. Click on the newly added button and you will see that the content is no longer resizing the height as the iframe height is always 400px regardless of the size of the html content.​
ACTUAL RESULT:
The content is no longer resizing the height as the iframe height is always 400px regardless of the size of the custom button html content.​
EXPECTED RESULT:
The custom button iframe should resize its height as all previous versions of Plesk.​
ANY ADDITIONAL INFORMATION:
This affects all of our current Plesk extensions.
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM:
Confirm bug
 

Attachments

  • 2018-09-06_08h27_28.png
    2018-09-06_08h27_28.png
    35.2 KB · Views: 17
  • 2018-09-06_08h26_39.png
    2018-09-06_08h26_39.png
    97.3 KB · Views: 17
This bug has been re-introduced in Plesk 18.0.16. Our extensions are getting cut off again.

```
[root@el7p17 ~]# plesk version
Product version: Plesk Obsidian 18.0.16
Build date: 2019/06/28 21:00
OS version: CentOS 7.6.1810
Revision: 1201b634883e6defb47a675d39c89ae07fb18b68
Architecture: 64-bit
Wrapper version: 1.2
```
 

Attachments

  • 2019-07-09_09h36_22.png
    2019-07-09_09h36_22.png
    153.5 KB · Views: 9
This bug is still present in Plesk Obsidian Release Candidate 3. Now the iframe is only resized to 749px height regardless of the actual height of the content.
 
Last edited:
Hi @danami,

We can't reproduce the issue on our Plesk Obsidian RC3 builds based on provided steps. I assume there could any specific details or configuration which we are missing.

To fix the issue, it will be great if could check it on your Plesk installation. Please contact our support team Plesk Help Center with a link to this thread for further investigation.
 
Thanks for looking at this @Anthony . I was able to implement a workaround by resizing the parent iframe from within our extensions which fixes it for us.
 
Back
Top