Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
How did you set it up initially? Was it a theme or plugin you used?
Initially, the shop was being maintenanced and set-up by an agency. We use the enfold-Theme. I have never set up anything related to the search or search suggestions. I can only tell that right now, none of the products are being displayed while typing in the search bar, only the blog posts are shown as a suggestion.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Can you show us the page with the search bar? We can then get a sense of where the problem is coming from.
Allright, this is the page
suessigkeiten-shop.com
You can enter anything in the search bar, I think it always shows the blog posts.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
This could be related; there is a JavaScript error on your page here:
<script data-cfasync='false' type='text/javascript'>
(function($) { if ( $( '.gtm4wp_productdata' ).length > 0 ) { for( var i=0; i<dataLayer.length; i++ ) { if ( dataLayer[ i ][ 'ecomm_prodid' ] ) { break; } } if ( i == dataLayer.length ) { // no existing dyn remarketing data found in the datalayer i = 0; dataLayer[ i ][ 'ecomm_prodid' ] = []; } if ( typeof dataLayer[ i ][ 'ecomm_prodid' ].push == 'undefined' ) { return false; } var productdata; $( '.gtm4wp_productdata' ).each( function() { productdata = jQuery( this ); dataLayer[ i ][ 'ecomm_prodid' ].push( '' + productdata.data( 'gtm4wp_product_id' ) ); }); } })(jQuery);
</script>
It looks like the problem is caused when something has minified the JavaScript.
Try deactivating all of your plugins to explore whether any could be responsible.
Thanks – i will investigate more. Could it be due to the use of any performance-plugins? Will disabling them restore the original code?
EDIT:
There was a plugin active that minifies scripts. But even after disabling said plugin, the script apperently doesnt work.
-
This reply was modified 6 years, 4 months ago by ruben7777.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Okay the error went away but as you know your problem persists.
You’re now getting 403 errors:
https://suessigkeiten-shop.com/wp-admin/admin-ajax.php 403 (Forbidden)
Which is coming from your theme’s avia.js script:
https://suessigkeiten-shop.com/wp-content/themes/enfold/js/avia.js?x48273&ver=4.2
On line 2140:
$.ajax({
url: avia_framework_globals.ajaxurl,
type: "POST",
data:values,
beforeSend: function()
{
loading.insertAfter(currentField);
},
success: function(response)
{
if(response == 0) response = "";
results.html(response);
},
complete: function()
{
loading.remove();
}
});
Looks like the theme’s code is correct, but for some reason your server is rejecting access to the admin-ajax.php file