Preview iframe incomplete for non-root pages

Greetings and Salutations,

We recently migrated between 2 hosts using Duplicator, but the domain did not change. After migrating all non-root pages are getting the iframe incomplete error, for example “andelaproducts.com/home/about-us/” will load fine but “andelaproducts.com/home/about-us/” or “andelaproducts.com/home/equipment-and-systems/” will not.

We are running PHP 5.6 with WP 5.0.3, Cornerstone 3.4.6 and X 6.4.6.

I have tried disabling all plugins besides cornerstone, increasing the timeout and memory limit in wp-config.php, using the core X theme rather than our child theme and we don’t currently use a caching plugin. I have also enabled WP_DEBUG and have not found any PHP errors.

Any help would be greatly appreciated.

Hello @andelaproducts,

Thanks for asking. :slight_smile:

Please note that WordPress does not supports PHP 5.6. In that regards, I suggest you to please upgrade PHP to at least version 7.1. You can get in touch with hosting provider to upgrade PHP.

In case problem is still there please share website login details in secure note for us to take a closer look.

It is very common to need to share sensitive information with our staff such as login or FTP information. In order to keep this private, be sure to use the Secure Note button that you will find at the bottom of each reply.

[/quote]

Thanks.

WordPress does in fact still support Legacy PHP from 5.2.4 and up. Also our previous host was running PHP 5.6 as well and the preview pages worked.

That being said I will post site credentials so you can take a look, thank you in advance.

Hi There,

Would you mind deactivating the Wordfence Security? If so, please do the following, deactivate the Wordfence security first, then login to your server and delete (but keep a backup) of the .htaccess file in the root directory of Wordpress installation.

Then navigate back to admin dashboard and re-save your permalinks under Settings > Permalinks. Then check the page.

If that did not work, try to disable the ModSecurity.

Let us know how it goes,
Cheers!

Reseting .htaccess had no noticeable affect, checking with our host in regards to “ModSecurity”

No luck with ModSecurity, any other thoughts?

We added a plugin to dump the server/WordPress/PHP settings can you look and see if anything is wrong that we have missed?

Hello @andelaproducts,

The given credentials is not working for us. It seems the password is incorrect. Please double check it.

Meanwhile, please make sure that you have meet the requirements to run the latest WordPress so that the theme and plugin features will work properly. I did some further investigation. WordPress 5.0 requires at least 7.2 (https://wordpress.org/about/requirements/). This could possibly be the cause of the issue. In most cases you cannot update your PHP version yourself and need to contact your host about this. The upgrade process is an easy process and should be something your host can do for you without affecting your website or charging you for it. Here’s a letter you can send to your hosting company:

Dear host,

I'm interested in running the open-source WordPress <https://wordpress.org/> web software and 
I was wondering if my account supported the following:

- PHP version 7.2 or greater
- MySQL version 5.6 or greater OR MariaDB version 10.0 or greater
- Nginx or Apache with mod_rewrite module
- HTTPS support

Looking forward to your reply.

Hope this helps. Kindly let us know.

I have reset the password.

a direct quote from https://wordpress.org/about/requirements/

Note: If you are in a legacy environment where you only have older PHP or MySQL versions, WordPress also works with PHP 5.2.4+ and MySQL 5.0+, but these versions have reached official End Of Life and as such may expose your site to security vulnerabilities.

also I will restate that the last host was running PHP 5.6 as well and everything worked. Also when i spun up my development server on my local machine it was also running PHP 5.6 and everything worked and we have another site on this host that is also using the X theme that is working properly.

Hello @andelaproducts,

I have investigated the issue and it seems a bug. I have replicated the issue in my testing server. Grand child or great grand child pages will display an error in the iframe preview in Cornerstone. I’ve submitted this to our issue tracker so the developers will be made aware of it. And while waiting for there investigation and resolution of this issues, I would highly recommend that you update the page first that it is a parent page and then edit it in Cornerstone. Once your done editing, you can change it back and assign it’s parent page again. This is the easiest and fastest way to edit your grand child and great grand child pages at the moment.

Please bear with us.

Thank You for the update

You’re most welcome!

Greetings again,

has there been any progress on this?

Hi @andelaproducts,

There is no news as of yet, for now, I recommend upgrading the PHP version as the recommendation. I’m not saying Wordpress does not support PH 5.2.4+, but how about other plugins and software that runs on it where it uses latest functions. It could cause an error which may lead to data issue passed through ajax, and the preview itself is based on it.

Thanks!

Hey,

In a moment of desperation just to be able to get something working, we tried copying the older version of X and Cornerstone from another site on this host that is working to the andela site and removed the current versions of X and Cornerstone. Unfortunately it is still showing the same error. is there any way to enable some kind of debug to see if there is some kind of error more than just “iframe incomplete” in case there is some kind of permissions error or something on just this site??

We talked to the host about updating PHP and they said they are already looking into updating all of their servers, but it is going to be a long term process.

Hello @andelaproducts,

Thanks for updating the thread. :slight_smile:

Please note that the features and functions implemented follows the latest standards laid out by WordPress. Having said that we’ll continue checking but I am not in a position to give you an assurance on any solution. My suggestion as of now would be to update PHP.

Thanks.

Hello,

My Name is AJ Mork, I was given access so i could contact you directly. I am Andela’s main contact at TotalGeekery, their new host.

As I can see they mentioned to you at the moment upgrading PHP is not an option. we are in the processes of vetting and future proofing our clients sites so that we can without incident but that is going to take a significant amount of time.

Frankly we don’t believe that updating PHP will solve this issue. We have multiple sites currently running Cornerstone with the X theme with no problems. The primary difference is that this site was migrated from another host.

The client is becoming increasingly and understandably frustrated at the fact that it has been almost a month and their site is still not working properly.

Hi @andelaproducts,

In that case, is there a way she could migrate it to another platform where is 7.2 is applicable? I’m not requesting transferring the site, but just a way so we could compare and continue our troubleshooting. The site’s size is a bit big so I couldn’t download a copy for testing on my local environment.

Does it work before the migration from another host? Is there a way we could still access it for testing? Maybe the migration process did something that breaks internal data. Though, that’s just my assumption since the testing is only limited to the information initially provided.

Thanks!

Hi,

Aj, here again, it worked on their last host that was running PHP 5.6 as well.

Unfortunately we dont have a server currently running PHP 7.2.

Just to double check Andela’s work I used duplicator to launch a copy on a local XAMPP server running PHP 5.6 and it worked fine. I also launched a development copy at http://andeladev.techgeekery.net (the login credentials should work there too) but it still didn’t work. My guess is there is some configuration that got carried through the migration that our servers don’t like.

I poked around in your code in the plugin editor and added some debug to try and see if i could find anything but all i could find was that while the html looked fine it was missing a CORNERSTONE_FRAME at the end and there was a script element missing that defined a csAppData. But as to why the are there when the page doesn’t have a parent and are missing when it does, thats a bit beyond my skill set.

Hi @andelaproducts,

May I know the FTP credentials in the secure note so we could further check it? I assume it works on other platforms as your test excerpt on the current environment. Maybe we can find something there.

Thanks!