January 24, 2019 at 9:39 pm #1058351
WPEngine is going to ‘force’ us to update to PHP 7.2 and WordPress 5.0.3 in March, so we have set up a ‘development’ environment to test.
The first thing we noticed is that Ajax is not working properly. In our example below, normally when the user clicks on the “Backwall Graphics” pic, Ajax opens above it and shows a slideshow of pics. (This is not working with Angular 4.1 running PHP 7.2).
(“Live” website – Angular 4.1 running PHP 5.6):
[ Screengrab of how it properly works when the “Backwall Graphics” pic is clicked:
(“Development” website – Angular 4.1 running PHP 7.2):
http://visualimpact72.wpengine.com/trade-show-graphics-examples/ (hosted on WPengine)
( User Name: demo / Password: test72 )
[ Screengrab of how it doesn’t work when the “Backwall Graphics” pic is clicked:
So, evidently, PHP 7.2 ‘breaks’ this function. Is there any way we can fix this so it works properly?
Visual Impact SystemsJanuary 26, 2019 at 8:39 pm #1059244
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( do be sure that we have enough time to debug ).
- Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create a admin user and post the login credentials in the “private data” field.
BasilisJanuary 28, 2019 at 2:08 pm #1059626
Thank y’all VERY MUCH for helping us out on this!
Logins in private area.
Visual Impact Systems
https://visualimpactsystems.com/January 31, 2019 at 11:17 am #1060884
I think it’s just a server configuration issue. This is the error that I get in the console.
Access to XMLHttpRequest at 'https://visualimpact72.wpengine.com/wp-admin/admin-ajax.php' from origin 'http://visualimpact72.wpengine.com' (hosted on WPengine) <small class='av-host-link'>(hosted on <a href='http://bit.ly/kwpengine' target='_blank' rel="nofollow">WPengine</a>)</small> has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
A “http” url is trying to fetch the admin-ajax.php from a “https” url. Fixing the ssl or a CORS policy configuration in the .htaccess file should fix the issue. You will probably not experience this issue on the live site as long as ssl certificate is configured correctly.
IsmaelJanuary 31, 2019 at 5:19 pm #1061064
Thank you for getting back to us so quickly. We contacted WPEngine, and it was a really simple fix (but it also ‘broke’ other things).
In the WordPress “General Settings” all we had to do was change the “WordPress Address (URL)” and the “Site Address (URL)” to “https” (it was only “http”).
The Ajax seemed to work the way it is supposed to with at least the ‘example’ page we were using here.
But, then all the images on the home page wouldn’t load (WPEngine told us that the theme files have “hardcoded http links in them”, and when they tried to do a “search and replace” it totally ‘messed up’ the site).
So, we reverted to the backup of the site we made before doing the “search and replace” and changed the WP General Settings back to http, and it seems to be working like it used to (but without Ajax working).
All that to say, we are going to try updating to WP 5.0.3 while the WP General Settings are set to “http”. [ It is currently running PHP 7.2 and seems to be working okay ].
So, after we disable Gutenberg (you suggested us to do it for Angular 4.1), and if it seems to be working okay, if we then change the WP General Settings to “https,” would that be a good enough ‘test’ if Ajax then works? If it does work okay on the ‘example’ page we are using, do you then think that its a pretty good bet that these will work ‘all together’ on the live site? (PHP 7.2; WP 5.0.3; and HTTPS).
Visual Impact SystemsFebruary 3, 2019 at 7:26 pm #1062358
You should give it a try – but better create a staging web site on WPEngine and run it through that.
BasilisFebruary 5, 2019 at 4:14 pm #1063208
Logging in to the dashboard of the ‘Development’environment (which is running PHP 7.2) to update to WP 5.0.3, we see two options:
An “Upgrade to WordPress 5.0” button and a “Install the Classic Editor” button.” It says that the Classic “plugin” will be maintained until January 1, 2022. Do you think we should use the Classic editor plugin instead of installing 5.0.3 and disabling the editor? (with to code you gave us previously in this post). Do you think it would be more compatible with Angular 4.1?
Classic Editor Plugin (from WordPress): https://wordpress.org/plugins/classic-editor/
Visual Impact SystemsFebruary 8, 2019 at 5:11 am #1064399
The editors have nothing to do with the issue and the portfolio AJAX will or will not work regardless of your builder of choice, but we do recommend using the classic editor because Angular is not compatible with the block editor. I think the only way forward is to test it on the live site.
IsmaelFebruary 12, 2019 at 2:46 pm #1065951
Thought I would give you an update on what is happening (just in case others are going through the same thing as us—especially if they are hosted with WPEngine and will be ‘forced’ to update to PHP 7.2 and WordPress 5.0.3 by mid-March 2019).
Since we just did all this yesterday (11 FEB 19), from a cursory look, most everything looks like it’s working, especially AJAX, which is working just like it did before all the upgrading.
We started with WordPress 4.9.9 and Angular 4.1 (and we have not yet had to change any of the Angular theme files).
– Install the “Classic Editor” (so we wouldn’t have to “disable” Gutenberg). We did this in the WordPress wp-admin Dashboard. [ The installed configuration of the plugin was set up just how WPEngine suggested ].
– Upgrade to WordPress 5.0.3 (We also did this in the WordPress wp-admin Dashboard).
– Install “Better Search Replace” plugin. Select “All tables” (you may not want to do the posts table). Uncheck “Case sensitive.” Uncheck “Replace GUIDs.” CHANGE: “http:” to “https:” [ Note: We did not need the Pro version of BSR with WPEngine, since you can do a “Backup Point” that backs up the database ]. [ Note: You need to run in the https environment for AJAX to work properly ]. [ Note: Check to be sure that “WordPress Address (URL)” and “Site Address (URL)” in the wp_admin Dashboard have been both changed to “https” ].
NOTE: Your hoster (WPEngine for us) has to set up the server to “force https.” If you don’t, at least for us, the images would not load initially (we had to go to an ‘internal’ page first, then go back to the home page to have the images load).
Just one small ‘issue’ right now is with “Social Media Widget” (by Noah Kagan). It is showing all the available icons (47 of them) even though we only have 16 “set up” in the plugin). [ We have sent a support note to Noah about this ]. [ There are a few plugins we will not be able to test in the development environment (like “Gravity Forms” and “reCAPTCHA”) since they are ‘linked’ only to the “live” site URL ].
We would like to keep this issue “open” just in case we come across some other issues in testing in our “development environment” ( https://visualimpact72.wpengine.com/ ), then we could share them.
Thanks for ALL YOUR EFFORTS on this for us! You all are the BEST TEAM we have worked with in the WordPress ‘industry’!
Visual Impact Systems
[ “Live” site (PHP 5.6; WP 4.9.9) as of 11 FEB 19: https://visualimpactsystems.com/ ]
February 14, 2019 at 4:15 am #1066759
- This reply was modified 1 week, 3 days ago by mbesh.
You must be logged in to reply to this topic.