-
AuthorPosts
-
January 3, 2022 at 5:41 pm #1334081
Support,
WPEngine has told us that they are going to ‘force’ us to update to the latest version of WordPress in the near future, and we are still running WP 5.4.8 because we are running Angular 4.1. So, they upgraded us to their current Production/Staging/Development environments so we could do some testing.So, for now, the Production (“Live”) site has Angular 4.1 installed with WordPress 5.4.8 running—and everything works just fine:
https://visualimpactsystems.com/On the new Staging site, there is Angular 4.1 installed with the latest WordPress 5.8.2 running. As you can see on the ‘Home’ page (“Welcome”), the images never load (AJAX issue?):
https://visualimpactsg.wpengine.com/Then, on the Development site, we have the latest Enfold installed (4.8.8.1) with the latest WordPress 5.8.2 running. As you can see—comparing it to the Production site—Enfold did not ‘read’ (create) the “templates” that ‘build’ the pages [ 40 “landing pages” ].
Examples:
(Click on the image to have the AJAX ‘slideshow’ to appear)
We see that Enfold has a “portfolio” feature, but not a “builder” like Angular had.
So, a few questions:
– Is it possible for a “programmer” there (Kriesi?) to create some code that would fix Angular so it would work with WP 5.8.2? (We would be open to paying them to do this). [ It might even help some other companies that are still running Angular. ]
– Is there an ‘easy’ way to create “templates” for the 40 “landing pages” in Enfold so we could recreate the same ‘look’/navigation we have on our old Angular (Live) site? [ Or, is there a conversion ‘routine’ that you have (or could ‘code’) that would do all this ‘building’? ].
Also, since you helped us over the years with custom code for many ‘special’ formatting things, it looks like the Enfold files (functions, header, etc., and many other files you had us change), are very different or don’t even have the same ‘function’ in them.
We appreciate your time and effort on this.
Mark Besh
Visual Impact SystemsJanuary 4, 2022 at 5:53 am #1334138Hey mbesh,
Thank you for the inquiry.
1.) The issue with the images occurs because of an error in the themes/angular/js/aviapoly.js, around line 1436.
if ($.browser.msie && $.browser.version < 9) { animTime = 600; }
$.browser functions have been removed from the latest version of jQuery starting from version 1.9. Downgrading jQuery to an older version might fix the issue.
2.) Please note that Enfold and Angular are completely different themes and don’t share the same functionality. The global templates on Angular cannot be converted to Enfold templates. You will have to recreate them manually from scratch using the Advance Layout Builder from Enfold.
As you may already know, we have removed older themes from Themeforest including Angular since 2020, which also ended the product support. There has been no update or compatibility fixes since, so any issues that will arise from then on will have to be forwarded to a different developer.
// https://kriesi.at/archives/wordpress-5-0-and-enfold-4-5-1
Best regards,
IsmaelJanuary 4, 2022 at 12:48 pm #1334180Ismael,
Thanks for the quick response.
Could you instruct us on where to get that older jQuery and how to ‘install’ it (place it in the theme folder in the “js” folder?)—so we can test that idea?
If that doesn’t work, could you ‘point’ us to the documentation that shows how to use the Advanced Layout Builder in Enfold (and possibly how it ‘relates’ to the older Angular Template Builder?)
Also, could you (or one of your ‘older’ associates that supported Angular back when) be that “developer” (since y’all know the Avia framework)?
Mark Besh
Visual Impact SystemsJanuary 6, 2022 at 4:03 am #1334459Hi,
Thank you for the update.
You can simply add this filter in the functions.php file to deregister the default jQuery library and register an older version. But this might break other plugins and scripts in the site, which might be relying on the latest version of the librar.y
function ava_modify_jquery_version() { if (!is_admin()) { wp_deregister_script('jquery'); wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js', false, '1.8.s'); wp_enqueue_script('jquery'); } } add_action('init', 'ava_modify_jquery_version');
The filter will register version 1.8.3.
Unfortunatetely, we will not be able to help you further in this case since the support for the Angular theme has ended a long time ago. We recommend hiring a freelance developer to fix any issues with the theme or transfer to a different host, which allows any version of WordPress of your choice.
Best regards,
IsmaelJanuary 6, 2022 at 10:50 pm #1334589Ismael,
Thanks for the solution. Is there a ‘specific’ place we need to put this code? (So we don’t have to put an older version ‘physically’ into the “js” folder?)If we need a “developer,” would there be a person ‘associated’ with Kriesi support that could help us?
Mark Besh
Visual Impact SystemsJanuary 7, 2022 at 5:25 am #1334635Hi Mark,
You have to add the code in the functions.php file. It should deregister the current version of jQuery and register an older one (1.8.3). But again, this could affect other plugins and scripts, which rely on the latest version of the library.
You can contact our partner (Codeable) for additional assistance with the older and unsupported themes.
// https://kriesi.at/contact/customization
Thank you for your patience.
Best regards,
IsmaelJanuary 7, 2022 at 8:01 pm #1334719Ismael,
Thanks for being patient with me on this.I put your code into the “# Frontend Stuff necessary for the theme:” area of the functions.php and it ‘broke’ the site and showed an error. I then moved the code to the end of the functions.php file and it had the same error. (Replaced with the original file and it worked again).
This is where I put it…
––––––––
##################################################################
# Frontend Stuff necessary for the theme:
##################################################################$lang = TEMPLATEPATH . ‘/lang’;
load_theme_textdomain(‘avia_framework’, $lang);/* Register frontend javascripts: */
if(!is_admin()){
add_action(‘init’, ‘avia_frontend_js’);
}/* Register older version (1.8.3) of jQuery to fix home page images showing up */
function ava_modify_jquery_version() {
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery',
'http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js', false, '1.8.s');
wp_enqueue_script('jquery');
}
}
add_action('init', 'ava_modify_jquery_version');if(!function_exists(‘avia_frontend_js’))
{
function avia_frontend_js()
{
wp_register_script( ‘avia-default’, AVIA_BASE_URL.’js/avia.js’, array(‘jquery’,’avia-html5-video’), 2, false );
wp_register_script( ‘avia-prettyPhoto’, AVIA_BASE_URL.’js/prettyPhoto/js/jquery.prettyPhoto.js’, ‘jquery’, “3.0.1”, true);
wp_register_script( ‘avia-html5-video’, AVIA_BASE_URL.’js/mediaelement/mediaelement-and-player.min.js’, ‘jquery’, “1”, true);
wp_register_script( ‘aviapoly-slider’, AVIA_BASE_URL.’js/aviapoly.js’, ‘jquery’, “1.1.0”, true);
}
}
. . .
–––––Did I put this in the wrong place?
So, to give you more information, I downloaded the “jquery.js” file and this is what it says at the top of the file:
/*!
* jQuery JavaScript Library v1.5.1
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Wed Feb 23 13:55:29 2011 -0500
*/I’m thinking that we have version 1.5.1. Right?
I forgot to mention that we noticed that the images didn’t load when WP 5.5 came out (so we have been running WP 5.4.8 ever since). So, does this give you a bit more info to try to help us out? (What did WP 5.5 change that would make this happen?)
[ I know that this is an old theme that you are no longer ‘officially’ supporting, but we do pay for Enfold support (every 6 months—and did so recently). So, could you please help me a bit more to try to make this work for us? (This would be A LOT of work to ‘upgrade’ to Enfold, and we are very busy with other clients right now) ].
Kind Regards,
Mark Besh
Visual Impact SystemsJanuary 10, 2022 at 6:48 am #1334928Hi,
Thank you for the update.
What was the error when you added the code? The same code works fine on our end. Please check the screenshot in the private field. Make sure to copy the code directly from the forum, not from your email.
Best regards,
IsmaelJanuary 10, 2022 at 5:01 pm #1334971Ismael,
I REALLY appreciate you being patient with me on this. You probably think I’m ‘stupid’ (and I’m thinking so, too). I must be missing something really simple.
Just to be clear, this is what I am seeing on the Staging site (https://visualimpactsg.wpengine.com/):
http://4vis.com/After_First_Location-Still_Trying_to_Load_Images.png[ FYI: This was the error I received the first time I tried your code (and I don’t remember the ‘location’ in the file that it gave this to me): http://4vis.com/Error-After_Second_Location_of_Code.png ].
So, I copied the code directly from your forum post above (on January 6 at 4:03 am), and pasted it into 4 different ‘locations’ in the functions.php file, cleared the cache in 3 different browsers (Chrome, Firefox, and Safari), and even cleared the server cache (on WPEngine). Every time it would just continue to try to load the images on the Home page.
@@@@@@@@@@@@@@@@
FIRST LOCATION:
<?php
global $avia_config;
if(isset($avia_config[‘use_child_theme_functions_only’])) return;/*
* wpml multi site config file
* needs to be loaded before the framework
*/require_once( ‘config-wpml/config.php’ );
function ava_modify_jquery_version() {
if (!is_admin()) {
wp_deregister_script(‘jquery’);
wp_register_script(‘jquery’,
‘http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js’, false, ‘1.8.s’);
wp_enqueue_script(‘jquery’);
}
}
add_action(‘init’, ‘ava_modify_jquery_version’);##################################################################
# AVIA FRAMEWORK by Kriesi# this include calls a file that automatically includes all
# the files within the folder framework and therefore makes
# all functions and classes available for later userequire_once( ‘framework/avia_framework.php’ );
##################################################################
@@@@@@@@@@@@@@@@
SECOND LOCATION:
##################################################################
# Frontend Stuff necessary for the theme:
##################################################################$lang = TEMPLATEPATH . ‘/lang’;
load_theme_textdomain(‘avia_framework’, $lang);/* Register frontend javascripts: */
if(!is_admin()){
add_action(‘init’, ‘avia_frontend_js’);
}function ava_modify_jquery_version() {
if (!is_admin()) {
wp_deregister_script(‘jquery’);
wp_register_script(‘jquery’,
‘http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js’, false, ‘1.8.s’);
wp_enqueue_script(‘jquery’);
}
}
add_action(‘init’, ‘ava_modify_jquery_version’);if(!function_exists(‘avia_frontend_js’))
{
function avia_frontend_js()
{
wp_register_script( ‘avia-default’, AVIA_BASE_URL.’js/avia.js’, array(‘jquery’,’avia-html5-video’), 2, false );
wp_register_script( ‘avia-prettyPhoto’, AVIA_BASE_URL.’js/prettyPhoto/js/jquery.prettyPhoto.js’, ‘jquery’, “3.0.1”, true);
wp_register_script( ‘avia-html5-video’, AVIA_BASE_URL.’js/mediaelement/mediaelement-and-player.min.js’, ‘jquery’, “1”, true);
wp_register_script( ‘aviapoly-slider’, AVIA_BASE_URL.’js/aviapoly.js’, ‘jquery’, “1.1.0”, true);
}
}@@@@@@@@@@@@@@@@
THIRD LOCATION:
##################################################################
# Frontend Stuff necessary for the theme:
##################################################################$lang = TEMPLATEPATH . ‘/lang’;
load_theme_textdomain(‘avia_framework’, $lang);/* Register frontend javascripts: */
if(!is_admin()){
add_action(‘init’, ‘avia_frontend_js’);
}function ava_modify_jquery_version() {
if (!is_admin()) {
wp_deregister_script(‘jquery’);
wp_register_script(‘jquery’,
‘http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js’, false, ‘1.8.s’);
wp_enqueue_script(‘jquery’);
}
}
add_action(‘init’, ‘ava_modify_jquery_version’);if(!function_exists(‘avia_frontend_js’))
{
function avia_frontend_js()
{
wp_register_script( ‘avia-default’, AVIA_BASE_URL.’js/avia.js’, array(‘jquery’,’avia-html5-video’), 2, false );
wp_register_script( ‘avia-prettyPhoto’, AVIA_BASE_URL.’js/prettyPhoto/js/jquery.prettyPhoto.js’, ‘jquery’, “3.0.1”, true);
wp_register_script( ‘avia-html5-video’, AVIA_BASE_URL.’js/mediaelement/mediaelement-and-player.min.js’, ‘jquery’, “1”, true);
wp_register_script( ‘aviapoly-slider’, AVIA_BASE_URL.’js/aviapoly.js’, ‘jquery’, “1.1.0”, true);
}
}@@@@@@@@@@@@@@@@
FOURTH LOCATION (At end of file):
/**
* Takes the youtube video ID stored in a custom field and adds a full Youtube URL to the content to allow
* the video SEO plugin to index it.
*
* The video URL is added to the top of content to make it override other video’s in the post.
*
* @param string $content the input content field.
* @param array $vid the video array for the post.
*
* @return string $content
*/
function fix_content_input( $content, $vid ) {
$slides = avia_post_meta($vid[‘post_id’], ‘slideshow’);
$video = ”;
if(!empty($slides[0]))
{
foreach($slides as $slide)
{
if(!empty($slide[‘slideshow_video’])) $video .= ‘ ‘ . $slide[‘slideshow_video’];
}
}
$content = “\n” . $video . “\n” . $content;return $content;
}
add_filter( ‘wpseo_video_index_content’, ‘fix_content_input’, 10, 2 );// deactivate default theme seo if third party plugin is used. Currently supported plugins: Yoast WP SEO and All in One SEO
if(defined(‘WPSEO_VERSION’) || class_exists(‘All_in_One_SEO_Pack’)) $avia_config[‘deactivate_seo’] = true;function ava_modify_jquery_version() {
if (!is_admin()) {
wp_deregister_script(‘jquery’);
wp_register_script(‘jquery’,
‘http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js’, false, ‘1.8.s’);
wp_enqueue_script(‘jquery’);
}
}
add_action(‘init’, ‘ava_modify_jquery_version’);@@@@@@@@@@@@@@@@
Where did you put the code to make it work?
Frustrated (and feeling ‘stupid’),
Mark BeshJanuary 12, 2022 at 4:58 am #1335155Hi,
Sorry for the troubles. Would you mind posting the WP and FTP login details of the staging site in the private field? We will try to add the code at the very bottom of the functions.php file and check for the error.
Thank you for your patience.
Best regards,
IsmaelJanuary 12, 2022 at 1:43 pm #1335242Ismael,
Thank you for being ‘patient’ with me!I REALLY appreciate this. You are ‘wonderful’ for spending all this time with me on this! You will be saving us a WHOLE LOT of time if you can make this work (so we don’t have to totally ‘rebuild’ the site). [ FYI: We just used the “Enfold” theme for a recent website we developed for a new client: https://wjcousinsandassociates.com/ (and have used it many times in the past). It’s a great theme. ].
The logins are in the private area.
Feel free to do ANYTHING you would like to the site—even ‘break’ it beyond repair—since I made a “Backup Point” on WPEngine and I can get it back to where it is now if you need it. [ Think we need to download a different version of jQuery and put it in the “js folder”? ]
Again, we REALLY appreciate you spending the effort on this for us.
Mark Besh
Visual Impact SystemsJanuary 13, 2022 at 2:45 am #1335330Hi,
Thank you for the info.
Instead of manually adjusting the jQuery version, we installed the Version Control for jQuery plugin to load an older version of the library. The images in the grid are now displaying correctly. Please make sure to purge the cache before checking the page.
Best regards,
IsmaelJanuary 13, 2022 at 1:59 pm #1335426Ismael,
Thanks VERY MUCH for all your efforts on this!
For whatever reason, the “PARTNERS” images (on the Home page) don’t load, although the link works. (FYI: They are ‘rollovers’)
[ Here’s the “LIVE” site for reference: https://visualimpactsystems.com/ ]Also, I’m assuming this next one is related to “Ajax.”
For example, click on the following link:
Now, for example, click on “GrandFabric”. The “slideshow” never loads, and the “prev”/”next” ‘buttons’ don’t work either.
Again, Thanks much for all your help on this.
Mark Besh
Visual Impact SystemsJanuary 14, 2022 at 7:14 am #1335513Hi,
We can use this css code temporarily to force the images in the “partners” section to display. They do not display because of a preloader error in the scripts.
.inner_column img { visibility: visible; }
Unfortunately, we are not sure why we get this preloader error in the slider too.
jquery-migrate-3.3.2.min.js?ver=3.3.2:2 Uncaught TypeError: Cannot read properties of undefined (reading 'apply') at Function.e.<computed> [as unique] (jquery-migrate-3.3.2.min.js?ver=3.3.2:2:1205) at s.fn.init.v.fn.<computed> [as parent] (jquery-1.8.3.min.js?ver=1.8.3:2:63890) at HTMLUListElement.<anonymous> (aviapoly.js?ver=1.1.0:1334:21) at Function.each (jquery-1.8.3.min.js?ver=1.8.3:2:14543) at s.fn.init.each (jquery-1.8.3.min.js?ver=1.8.3:2:11217) at s.fn.init.$.fn.aviaImagePreloader (aviapoly.js?ver=1.1.0:1330:15)
Again, you may need to hire a freelance developer to further inspect the issues with the theme and make it compatible with the latest version of WordPress.
Best regards,
IsmaelJanuary 15, 2022 at 12:27 am #1335644Ismael,
Again, thanks MUCH for all your efforts on this.
Are there some things you could suggest we do (like changing up the versions of jquery with that plugin that you installed?; Putting in different versions of Ajax? Other suggestions…?). [ We are pretty familiar with FTP/changing out files. We just need some ‘direction’/what to try ].
It seems like it is really ‘close’ to working properly.
After doing some of your suggestions, if we do have to hire a freelancer, would you have a suggestion on who might actually ‘know’ Angular? (You? Devon? Victoria? Basillis? Yigit? Rikard? Someone else ‘at’ Kriesi?)
Kind Regards,
Mark Besh
Visual Impact SystemsJanuary 17, 2022 at 6:43 am #1335829Hi,
According to the report above, the issue is with preloader script in the aviapoly.js file. You have to ask the developer if they can locate why the above error occurs and fix it. We recommend Codeable or any freelance developers from job sites like Upwork.
If you have more questions regarding Enfold, please feel free to open a new thread. We will close this thread for now.
Thank you for your understanding.
Best regards,
IsmaelJanuary 20, 2022 at 2:02 pm #1336358Ismael,
Again, we REALLY appreciate ALL your efforts on this! Just one last question:
Do you know of some ‘function’/’feature’ in Angular that we could use to ‘get around’ the Avia javascript ‘issue’? What I mean by this is when someone clicks on one of the pics in a ‘layout grid’ (for example – https://visualimpactsg.wpengine.com/trade-show-backwalls/), it would just show a ‘grid’ of pics for that product rather than launching a “slideshow”? (Which would hopefully solve the Ajax issue).
Kind Regards,
Mark Besh
Visual Impact SystemsJanuary 24, 2022 at 3:01 am #1336794Hi,
Do you know of some ‘function’/’feature’ in Angular that we could use to ‘get around’ the Avia javascript ‘issue’?
The issue in the script that we mentioned above has to be fixed. You have to hire someone to update the Angular theme and make it compatible with the latest version of WordPress and of jQuery.
If you have more questions about Enfold, please feel free to open another thread. We will close this one for now.
Thank you for your understanding.
Best regards,
Ismael -
AuthorPosts
- The topic ‘Angular to Enfold Transition’ is closed to new replies.