-
Search Results
-
I updated my theme to the latest version and now I cannot login to the backend, I am getting the following error
Error Details
=============
An error of type E_ERROR was caused in line 1017 of the file /home/customer/www/yatesco.net/public_html/wp-content/plugins/wordpress-seo-premium/inc/class-wpseo-meta.php. Error message: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, bool given in /home/customer/www/yatesco.net/public_html/wp-content/plugins/wordpress-seo-premium/inc/class-wpseo-meta.php:1017
Stack trace:
#0 /home/customer/www/yatesco.net/public_html/wp-content/plugins/wordpress-seo-premium/inc/class-wpseo-meta.php(1017): array_map(Object(Closure), false)
#1 /home/customer/www/yatesco.net/public_html/wp-content/plugins/wordpress-seo-premium/admin/formatter/class-post-metabox-formatter.php(172): WPSEO_Meta::keyword_usage(‘Hycoa’, 734)
#2 /home/customer/www/yatesco.net/public_html/wp-content/plugins/wordpress-seo-premium/admin/formatter/class-post-metabox-formatter.php(132): WPSEO_Post_Metabox_Formatter->get_keyword_usage_for_current_post(‘Hycoa’)
#3 /home/customer/www/yatesco.net/public_html/wp-content/plugins/wordpress-seo-premium/admin/formatter/class-post-metabox-formatter.php(55): WPSEO_Post_Metabox_Formatter->get_focus_keyword_usage()
#4 /home/customer/www/yatesco.net/public_html/wp-content/plugins/wordpress-seo-premium/admin/formatter/class-metabox-formatter.php(42): WPSEO_Post_Metabox_Formatter->get_values()
#5 /home/customer/www/yatesco.net/public_html/wp-content/plugins/wordpress-seo-premium/admin/metabox/class-metabox.php(273): WPSEO_Metabox_Formatter->get_values()
#6 /home/customer/www/yatesco.net/public_html/wp-content/plugins/wordpress-seo-premium/admin/metabox/class-metabox.php(879): WPSEO_Metabox->get_metabox_script_data()
#7 /home/customer/www/yatesco.net/public_html/wp-includes/class-wp-hook.php(324): WPSEO_Metabox->enqueue(‘post.php’)
#8 /home/customer/www/yatesco.net/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#9 /home/customer/www/yatesco.net/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#10 /home/customer/www/yatesco.net/public_html/wp-admin/admin-header.php(118): do_action(‘admin_enqueue_s…’, ‘post.php’)
#11 /home/customer/www/yatesco.net/public_html/wp-admin/edit-form-advanced.php(425): require_once(‘/home/customer/…’)
#12 /home/customer/www/yatesco.net/public_html/wp-admin/post.php(206): require(‘/home/customer/…’)
#13 {main}
thrownmy site is https://yatesco.net/
I had to deactivate the plugin temporary
If I load this page, it displays properly on a PC and via Dev Tools. If however I view the page on an Android phone, the thumbnail of the Hotel Nevada near the bottom of the page is not shown – https://imgur.com/l350MY4.
The img code is:
<img loading="lazy" decoding="async" aria-describedby="caption-attachment-7644" class="size-square wp-image-7644" src="https://www.americanroadtrips.net/wp-content/uploads/2019/11/Hotel-Nevada-180x101.jpg" alt="Hotel Nevada at night" width="180" height="101" srcset="https://www.americanroadtrips.net/wp-content/uploads/2019/11/Hotel-Nevada-180x101.jpg 180w, https://www.americanroadtrips.net/wp-content/uploads/2019/11/Hotel-Nevada-300x169.jpg 300w, https://www.americanroadtrips.net/wp-content/uploads/2019/11/Hotel-Nevada-80x45.jpg 80w, https://www.americanroadtrips.net/wp-content/uploads/2019/11/Hotel-Nevada-495x279.jpg 495w, https://www.americanroadtrips.net/wp-content/uploads/2019/11/Hotel-Nevada-150x84.jpg 150w, https://www.americanroadtrips.net/wp-content/uploads/2019/11/Hotel-Nevada.jpg 700w" sizes="(max-width: 180px) 100vw, 180px">The image is inserted on the page as the 180×101 px size thumbnail, with a lightbox link to the full size media file. I use the Simple Image Sizes plugin and also remove multiple Enfold images from being created in functions.php
However when the original image was first uploaded a Portfolio size image was created of 495×279 px. As you can see, this is referenced in the img code. Since then, to save space I have deleted all unnecessary thumbnails. Thus Hotel-Nevada-495×279.jpg no longer exists in Uploads.
I then edited the page, deleting the image, saving and updating. I did this to remove the reference to the 495px image from srcset. I then added the photo back onto the page and updated.
The code on the page, despite me deleting the photo and then re-adding it, is still referencing the 495 px image, per the code block above (and you can verify this on the live page).
The reason on Android no image is shown is because there is no 495 px file. But I know Enfold is trying to load this file because I created a file called Hotel-Nevada-495×279.jpg from the 180 px size image then uploaded it, refreshed the page on my Android phone – and the ‘false’ thumbnail was then seen. I’ve since deleted this.
1. Primary issue – why is Enfold even trying to load a 495 px wide image in responsive mode and not the 180 px image specified on the page?
2. After deleting the image from the page then re-adding it, why is Enfold still adding a reference to srcset to an image size that does not exist?
3. I have regenerated the thumbnails for the image and a 495 px size is not being created – the image stats then says “5 images reduced by 114.3 KB (66.4%)” yet View Stats lists 6 thumbnails, including a Portfolio at 495 px wide, even though the file does not exist. The image’s Attachment Metadata has a reference to ‘portfolio’ – is this the problem and if so why does regenerating the thumbnails not remove this given the Portfolio size is no longer allowed?
I tried to use accordion in an admin notice, so user would get information on what to do, but wouldn’t have to see ALL information in one big gulp.
This was a “tester” to see if would work in admin. It didn’t. It just put the four lines at the point in the page where I’d hoped for an accordion.I just see…but they’re just text, not clickable accordion items.
Toggle 1
Toggle Content for first tab goes here
Toggle 2
Toggle Content for second tab goes here
Here is my code —
As you can see in my comments to code, I realize I need to add that accordion code.
Might I be able to use the avf_shortcode_no_header_request? If so, how?//In order for this to work, I will need to somehow load the code for accordion.
//Apparently this means, either load ALL elements when don’t need all…OR
//perhaps something with https://github.com/KriesiMedia/enfold-library/blob/master/actions%20and%20filters/Request%20Handling/avf_shortcode_no_header_request.php
//and avf_shortcode_no_header_request.phpfunction sample_admin_notice__success() {
echo ‘<div class=”somethinghere”>’;
echo do_shortcode(“[av_toggle_container initial='0' mode='accordion' sort='' custom_class='' av_uid='av-w8wcwc']
[av_toggle title='Toggle 1' tags='' av_uid='av-37adsc']
Toggle Content for first tab goes here
[/av_toggle]
[av_toggle title='Toggle 2' tags='' av_uid='av-vu501g']
Toggle Content for second tab goes here
[/av_toggle]
[/av_toggle_container]“);
echo ‘</div>’;
}
add_action( ‘admin_notices’, ‘sample_admin_notice__success’ );Can this be done with avf_shortcode_no_header_request or another method?
Topic: Funky PHP Trouble
Hello!
We have multiple sites using Enfold child themes. All sites are on the latest version of the theme and the latest WordPress. We have a main site/installation and the other sites are installed in subfolders — so all on the same domain and the same PHP.
A few days ago, one of smaller the sites (one in a subfolder) went down because the theme will not load. I worked with my webhost’s tech support and there’s no malware or anything strange. They suggested downgrading the PHP from 8.2.24 to 7.4.33. I did that and the smaller site came back up. But our main site went down, saying it needs PHP 8.0. (Meanwhile the other sites using the same theme version, WordPress version, and PHP all stayed up.)
So I reset the PHP to 8.2. Here’s where I’m at …
UP: https://www.ecpubliclibrary.info/ (needs PHP 8 or higher)
DOWN: https://www.ecpubliclibrary.info/friends/ (needs PHP 7.4)
UP: https://www.ecpubliclibrary.info/teens/ (works on all PHP)
UP: https://www.ecpubliclibrary.info/kids/ (works on all PHP)Any idea what’s happening and how to fix it?
– Mike
Hello team, I would like to integrate a form on all portfolio pages as the last element in the content (not via hook after the content – before the footer). I tried this with the recommended shortcut from Contact Form 7 and put it directly into the corresponding template of Enfold:
<?php echo apply_shortcodes( ‘[contact-form-7 id=“1234” title=“Contact form 1”]’ ); ?>
Unfortunately, the shortcode is not executed, why is that?Many thanks and best regards
Topic: Mega menu (2)
Good evening,
I am still experiencing a series of problems with the mega menu, even though I have removed many of the items in it.
The display of the submenu is not the best if I use the MEGA MENU option. Option that I don’t want to remove. Unfortunately I can’t even edit the php file as the entry is not present in my wp dashboard.
I will explain in detail the problems I encounter, mainly concerning the division into columns and the fact that the space between the columns of the submenu are not equal to each other.
Specifically, in the PSORIASI item I had to use the “this column starts a new row” option to overcome the problem, but I don’t like this on a visual level *see photo 1.Another problem is found in the NEWS item, in the submenu yes you may notice how the GIORNATA MONDIALE DELLA PSORIASI item goes too far towards the last item of the submenu *see photo 2.
Finally, a problem that I have had since I started working on this website, the CERCA IL CENTRO item, inside it there are the entries of all the regions of Italy, in this case not only is the space between the various columns not the same, but the last two entries of the submenu are positioned too far apart from each other, under the first and fourth columns *see photo 3.
Furthermore, I would like the menu item SEARCH FOR THE CENTER to be highlighted. If it were possible to change the background color only for that portion of the menu with CSS or, if it were possible to change the color of the text, but I repeat ONLY FOR THAT MENU ITEM https://prnt.sc/QdkYeyVHaM35
I hope you can help me solve these problems.
I also attach a series of extra photos.
1. https://prnt.sc/Wa2Oo3u3px1N
2. https://prnt.sc/Jwc3BIsA1J6M
3. https://prnt.sc/0cjYJVwKBmQT
https://prnt.sc/KhK3jaU6s-Oi / https://prnt.sc/5NROCK4CqRP0 / https://prnt.sc/be0td4-9rmXe / https://prnt.sc/DUD97y6fMduK / https://prnt.sc/JrVc7U75v0rAKind regards,
MariaritaHi,
I have a weird issue on a modification that I implemented on a website. I wanted to include the captions in the lightboxes for a masonry gallery ; I found a thread here that gave a solution that works :But ! It only works if I empty the navigator’s cache and only the first time I visit the page. If I reload the page, or go on another page and then come back, the modification doesn’t work anymore. Any idea why ?
Here is the slitghly adapted code, lifted from Guenni007 :
function popup_masonry_gallery() { if(is_singular('regard-associe')) { ?> <script type="text/javascript"> (function($){ $(window).load(function(){ $('a.av-masonry-entry.lightbox-added').magnificPopup({ type: 'image', image: { titleSrc: false, markup: '<div class="mfp-figure">'+ '<div class="mfp-close"></div>'+ '<div class="mfp-img"></div>'+ '<div class="mfp-bottom-bar">'+ '<div class="mfp-title"></div>'+ '<div class="mfp-counter"></div>'+ '</div>'+ '</div>', }, mainClass: 'avia-popup mfp-zoom-in mfp-image-loaded', closeOnContentClick: false, midClick: true, gallery: { enabled: true }, callbacks: { markupParse: function (template, values, item) { values.title = '<span class="jmmfp-title"><strong>' + item.el.find('img').attr('title') + '</strong></span><br>' + item.el.closest('.av-masonry-entry').find('.av-masonry-entry-content').text(); }, }, }); // close the iframe window $(document).on('click', '.popup-modal-dismiss', function (e) { $.magnificPopup.close(); }); }); })(jQuery); </script> <?php }} add_action('wp_footer', 'popup_masonry_gallery');Any idea why that is ?
Thanks !









