Forum Replies Created
-
AuthorPosts
-
Thanks Guenni007, I’ve already implemented that particular change.
I guess we can close the thread now :)
Well, I feel silly – you’re right, it works when I stop using Private Mode on my browser… Interesting though that the rest of the theme and customization works but not this particular addition. I would have to try to look into that sometime…
Sorry for that, and thanks !
Hi Guenni,
It is ! That’s why I mentionned you in the first post. I often stumble on your posts when I come to find ways to customize Enfold… Your tips and tricks have been very useful for several years now!
Thanks for the tip, by the way. I corrected that. Sadly, it doesn’t solve the problem I mentionned (the script doesn’t seem to load on page reload or revisit without clearing the browser cache) – problem which, if you still take care of the website mentionned in that old thread (https://webers-testseite.de/lightboxes/), affects it too…Would trying to tie the script to avia-defaut change that ?
Using something likeif ( wp_script_is( 'avia-default', 'registered' ) ) { wp_add_inline_script( 'avia-default', '
?
Hi Ismael,
Thanks for your help. Sadly, that didn’t work. So I tried different things, and here are a few other elements that might help :
– when changing to another theme (like Twenty Twenty-Two), and adding a new product, the product image worked as intended, by which I mean that on the product page, when clicking on ‘Define featured image’ and uploading a new picture and selecting it, the proper thumbnail (uncropped) appeared on the page. I then saved the product and switched back to Enfold, and it kept the right uncropped thumbnail. And on the catalog, I could see the right, uncropped thumbnail.
– So I tried something else. I disabled the shop_catalog image size in my child theme function.php, changed back the woocommerce/config.php file to what it was originnaly, and then retried the whole process ; this time, even with Enfold activated, everything happened as it should – meaning I get my uncropped thumbnail. But if I reinstate the ‘shop_catalog image size, it starts picking it up again and not the woocommerce_thumbnail one.
And if I select a semi-old picture (one dating from no before the end of August), and the 450×450 pixel file exists on the server, it will get picked up even though the image size ‘shop_catalog’ is still removed. Regenerating the thumbnails and deleting the unused ones makes it work again.So it seems that somehow, the existence of the shop_catalog sized image is enough for it to take precedence over any other thumbnail…. Once again, I encourage you to try things out on the website I gave you. It truly baffles me.
Thanks for your help !
Hi Ismael,
Thanks for your answer. Before I start fiddling with stuff, I would just like to confirm that the function to allow the use of customized templates for the shortcodes also works for the shortcode helpers. The modified file (class-avia-product-slider.php) is located in the avia-shortcode-helpers folder, not the avia-shortcode folder ; won’t I need to adjust the function or to create a special sub-folder ?
Cheers, and thanks again !
Ah, sorry, the error you saw with the custom script is because the test site didn’t have the last version of it that makes it not activate on pages where it shouldn’t. That has been corrected.
The main issue still remains, though, as you can see.Hi,
Sorry, as I’ve said, I don’t think the problem is due to the “pu-link” class and the associated script, but with the Blog Articles avia element with the ‘Filter by date’ setting.
On the pages that are showing the critical error, if you change this settings in the relevant avia block, the problem goes away. I’ll give you access in private so you can check it out.The custom script you’re referring to is for adding aria-labels to the pagination links of the accessible version of the document library (when you click on ‘Mediatheque’, then on the button that says ‘Contenu alternatif’, it’s the pagination links at the bottom of the popup). This script is not active on the pages where the critical error happens ; what kind of issue did you notice with this one ?
Hi again,
I think I’ve found the issue…
Here is the relevant passage in postslider.php (I looked in 4.8.6.2), around line 1106 :$date_query = array(); if( 'date_filter' == $params['date_filter'] ) { $date_query = AviaHelper::add_date_query( $date_query, $params['date_filter_start'], $params['date_filter_end'], $params['date_filter_format'] ); }
And here the same passage in postslider.php in 4.8.7, around line 1131 :
$date_query = AviaHelper::date_query( array(), $params );
But apparently, jut replacing one with the other is not enough to make it work again.
Could you help ?
Thanks !
Hi again,
I’m sorry, I had misdiagnosed the problem… It actually appears that it is the ‘filter by date’ feature in the Blog Article avia element that bugs out. I use it on the pages mentionned, to selectively show some specific blog posts in a section of the page.As soon as, in the builder, I change this parameter (and decide to ‘show all’ or filter by time period’), everything works again. Maybe a typo in there ? Where should I look to check this ?
Oh, and since the problem is not at all what is in the title, should I make a new thread ?
Thanks !
Hi Ismael,
I’ll try. Thanks for your help, and thanks also to Guenni007 (I’ve seen a lot of your posts on these forums, and I appreciate all that you do for us Enfold users !)Cheers !
Hi,
Thanks for your help again. I was able to get rid of the error message – I just got the sti function “out” (see below) -, but the sticky post are not in first position in the grid (see links and explanations in private), which was the point of it all… Any idea ?
Thanks again !
// sticky posts function stipendus($n) { settype($n, 'int'); return $n ; } add_filter('avia_post_slide_query', 'avia_post_slide_query_mod_jm', 10, 2); function avia_post_slide_query_mod_jm($query, $params) { $include = array(); $sticky = get_option( 'sticky_posts' ); $args = array( 'taxonomy' => $params['taxonomy'], 'post__not_in' => $sticky, ); $posts = get_posts( $args ); foreach($posts as $post) { $include[] = $post->ID; } $include = array_merge($sticky, $include); // convert values of the $include from string to int $include = array_map("stipendus", $include); $query['post__in'] = $include; return $query; }
Hi Guenni,
Thanks for your help, but I’m afraid I wasn’t clear. When I switched the filter, I didn’t paste a new function, but changed the old one – and I do not have the two functions active at the same time (I comment out the bump_sticky_posts_to_top when I test the other one).
So the problem wasn’t with me having two avia_blog_post_query_mod functions.No, the interesting thing is when I paste the code (for the avia_blog_post_query_mod function), it tells me that the sti function (included in the code) causes the problem. When I change the name of the main function (avia_blog_post_query_mod) this doesn’t change. And when , in the code, I change the name of the sti function (to for example stipendous), the error message changes too and tells me stipendous is already declared on line 1048 so I cannot redeclare it on line 1048.
What is annoying is that I tried copying the code on another website, and the error doesn’t happen, which makes sense – but why is it not working on this website ?
Thanks for the help !
Hey Ismael,
Thanks for that. I’ve tried the code, and something weird happens : I cannot save the function.php file, and when I do, it causes a critical error on the site. When I try to save and it doesn’t, here’s what it’s telling me :
Your php code modifications have been cancelled due to an error on line 1048 of the file wp-content/themes/ActifsDV/functions.php. Please correct it and try to save again.
Cannot redeclare sti() (previously declared in wp-content/themes/ActifsDV/functions.php:1048)It seems kind of weird, because the mistake seems to happen on the same line that the function sti is first declared ?
Thanks for your help !
Excellent !
As usual, you guys are doing a top notch job.
Thanks for everything !
(we can close this ticket)Ah, yes, I forgot about that option…
Thanks, it does work much better now (there are still a couple of problems, but if it’s just one, that’s much better !)Any idea when the corrected file would be integrated into an official Enfold release (if there is one coming soon) ? Or should I just use your temp file for now ?
Cheers !
Hi,
Thanks for your help. Sadly, it didn’t seem to work… The padding rules are still affected. I put in private two links : one is the actual website (still with 4.8.3) and the other is a copy with 4.8.5 and the new file you gave me.
I did empty the caches (site + browser) ; but it appears that the new css rules still apply, and still have #top in front of them for padding and corners. Look for example at the white ‘Focus’ block.I’d appreciate if you could take a look !
Thanks !
March 30, 2021 at 4:09 pm in reply to: Frontend publisher pro insert Media object button not working #1291391Hi,
You’re right, it works – this is great news. Sorry about that then, I was sute I’d tried all the settings in there…Thanks !
We can close the thread then.
March 29, 2021 at 9:53 am in reply to: Frontend publisher pro insert Media object button not working #1291046Hi,
Thanks. I’ll be keeping an eye out on this one. I hope you find a solution, because for most clients, giving access to the backend is a bad idea… So frontend interactions are a must.Cheers, and thanks again for your help !
March 25, 2021 at 11:48 am in reply to: Frontend publisher pro insert Media object button not working #1290348The simplest is probably to give you FTP details (see private), but careful, there’s a lot going on there :)
And I’m not worried about the time it takes ; as I said, for the current project, I switched themes, but I would rather avod that for future ones.Thanks !
March 21, 2021 at 8:57 pm in reply to: Frontend publisher pro insert Media object button not working #1289491Hi,
Thanks for your help. Deactivating plugins is one of the first thing I did, without success (you can try too). And same as you, I don’t see any error messages that could point toxards where the problem is… Maybe a JQuery version ? I tried to deactivate JMigrate in Enfold, but that didn’t change anything either. Maybe both Enfold and the plugins (the problem is with the frontend post publishing and the frontend document publishing) define similar functions for frontend media library management ? I have to say I have no idea…Best !
March 17, 2021 at 3:50 pm in reply to: Frontend publisher pro insert Media object button not working #1288741Oups, in the previous message, one of the adress was still for the original site. The correct one is in private.
March 17, 2021 at 2:27 pm in reply to: Frontend publisher pro insert Media object button not working #1288728Okay, the duplicate website is up. I’ve switched back to Enfold already. I’ll give you the url in private.
Thanks for your help !
March 17, 2021 at 12:04 pm in reply to: Frontend publisher pro insert Media object button not working #1288709Hi,
Thanks for taking the time to test this. Sadly, it works because I changed theme (the project is urgent, so I just went ahead). But I’m still very much interested in finding a solution to the problem for future websites ; I’ll duplicate the site and give you the new url, so you can switch back to enfold and analyse the problem.March 13, 2021 at 5:55 pm in reply to: Frontend publisher pro insert Media object button not working #1288039I will, but that makes it two plugins that have a similar problem just because of enfold (Frontend publishing pro and wordpress download manager). Changing theme does solve the problem. Is there anything you could tell me that would help narrow it down ? I would really like to keep using enfold… For example, which scripts in enfold might be lnked to that ? That might help me with the plugins’ authors.
Thanks !
March 12, 2021 at 10:35 pm in reply to: Frontend publisher pro insert Media object button not working #1287888Oh, and the same thing seems to be happening for the file manager I also use on this site, that has a frontend uploader… See link and explanations in private.
Thanks for your help !
Hi Ismael,
Thanks for your help. I finally went with a tuned-down modal, that avoid the aforementionned problems… We can, I think, close the thread.Cheers !
Excellent, thank you !
I think we can close this thread now.
Cheers !Hi Ismael,
Thanks for your answer. I just have one final question : I have tried to make the change in slideshow-video.js update-proof by using my child theme to store the modified file, and added the proper function in function.php. But the changes made to slideshow-video.js do nto seem to be taken into account, and the loaded js file is still the original one, according to the console.
Could you check and see if I did domething wrong ? Or is it impossible to replace a js file this way ? The admin access I gave you previoulsy still works.
Thanks in advance !
Hey Ismael,
Thanks for your answer. I tried all of this, to no avail. The thing is, if you go and change the active theme to Twenty Twenty One, it works. It seems there is something the Enfold theme does when a YouTube iframe is to be displayed that TTO doesn’t do…
I actually just spent some time (after typing the previous sentence) exploring things, and I found where the conflict comes from – but I don’t really understand why.
I was looking at what js was loaded, and decided to try and deactivate the ones linked to videos (by renaming the folder/files) ; it turns out that the conflict comes from slideshow-video.js.
After experimenting further, I found that if I comment out one line – line 611 -, able player works with YouTube videos (see on page). Line 611 is this one :
window.onYouTubeIframeAPIReady = function(){ jQuery('body').trigger('av-youtube-iframe-api-loaded'); };
The thing is, commenting that line out at every update would be very inconvenient. Would there be a way to make this change permanent (I use a child theme) ? And also, what exactly does that line “do”, and what else am I potentially messing with by commenting it out ? The idea is that I might want to use, maybe, elsewhere on the site, YouTUbe videos as a slideshow (layerslider) background, or a color section background… Would commenting that line out have an influence on that ?
Cheers, and thanks for your help !
-
AuthorPosts