Tagged: x
-
AuthorPosts
-
April 15, 2016 at 6:22 am #884122
Hi,
I am monitoring all the source URLs giving a 404 error; in the log I find many entries like this:Source URL: /mywebsite/subpage1/page1/closedhand.cur
Referrer: /mywebsite/subpage1/page1/This is happening to all pages that contain an image gallery, as far as I can see.
How can I fix this?Many thanks.
April 15, 2016 at 6:25 am #884125This reply has been marked as private.April 15, 2016 at 5:55 pm #884990Hi there,
Thanks for posting in.
1. You have old custom code that is no more applicable for the cornerstone. It’s related to this file http://www.floridamasters.co.uk/wp-content/plugins/x-shortcodes/js/dist/site/vendor-ilightbox.min.js which still points to X shortcode. Please remove any custom code related to lightbox from your child theme’s functions.php, but make sure to back it up.
2. From what page you’re getting the missing cursor? Would you mind providing a screen-recording of this error. I can’t find it on my end.
Thanks!
April 19, 2016 at 5:04 am #889697Hi!
1.
so can I just remove the following or should I replace it with something else to achieve the same result?add_action('wp_footer', 'enqueue_lightbox_script'); function enqueue_lightbox_script() { echo '<script type="text/javascript" src="' . home_url() . '/wp-content/plugins/x-shortcodes/js/dist/site/vendor-ilightbox.min.js"></script> <script> jQuery(document).ready(function(){jQuery(".gallery-icon a").iLightBox({skin: "light",linkId: "gallery-image",overlay: {opacity: 0.875,blur: true},styles: {prevScale: 0.75,prevOpacity: 0.75,nextScale: 0.75,nextOpacity: 0.75},path: "horizontal",controls: {thumbnail: false}});}); </script>'; }
2.
I can see those errors in my “redirection” plugin (404 logs), you can see that in the attachment.3.
in my customizer “Edit Global Javascript” i have the following functions that are both not working anymore since last update to X:jQuery( function($) { $(document).on('click', '.x-accordion-toggle, .x-nav-tabs .x-nav-tabs-item a', function( e ){ $('html, body').stop(); }); }); jQuery( function($) { $('.x-brand.text').each( function(){ var logo_parts = $ ( this ).text().trim().split(' '); $( this ).html ( '<span class="part1">' + logo_parts[0] + '</span> <span class="part2">' + logo_parts[1] + '</span>' ); } ); } );
One is the accordion tabs (you can see it on the homepage) and the second is to have the two words Logo in 2 colors.
Can you help me with this, please?April 19, 2016 at 5:06 am #889700This reply has been marked as private.April 19, 2016 at 5:19 am #889728Hi again,
well, apparently my question #3 is resolved. I deleted the cache previously with no changes so I don’t know why it is now working. Anyway, just ignore #3.I hope you can help me with the functions.php above.
ThanksApril 19, 2016 at 8:29 am #890022Hi Valerio,
Glad to hear #3 is resolved. 🙂
As for the issue in functions.php file, please replace following code:
add_action('wp_footer', 'enqueue_lightbox_script'); function enqueue_lightbox_script() { echo '<script type="text/javascript" src="' . home_url() . '/wp-content/plugins/x-shortcodes/js/dist/site/vendor-ilightbox.min.js"></script> <script> jQuery(document).ready(function(){jQuery(".gallery-icon a").iLightBox({skin: "light",linkId: "gallery-image",overlay: {opacity: 0.875,blur: true},styles: {prevScale: 0.75,prevOpacity: 0.75,nextScale: 0.75,nextOpacity: 0.75},path: "horizontal",controls: {thumbnail: false}});}); </script>'; }
With this:
add_action('wp_footer', 'enqueue_lightbox_script'); function enqueue_lightbox_script() { echo '<script type="text/javascript" src="' . home_url() . '/wp-content/plugins/cornerstone/assets/js/dist/site/vendor-ilightbox.min.js"></script> <script> jQuery(document).ready(function(){jQuery(".gallery-icon a").iLightBox({skin: "light",linkId: "gallery-image",overlay: {opacity: 0.875,blur: true},styles: {prevScale: 0.75,prevOpacity: 0.75,nextScale: 0.75,nextOpacity: 0.75},path: "horizontal",controls: {thumbnail: false}});}); </script>'; }
Thank you!
April 19, 2016 at 9:22 am #890127This reply has been marked as private.April 19, 2016 at 3:17 pm #890734Hi Valerio,
Please try this:
function x_shortcode_recent_posts_v2code( $atts ) { extract( shortcode_atts( array( 'id' => '', 'class' => '', 'style' => '', 'type' => '', 'count' => '', 'category' => '', 'offset' => '', 'orientation' => '', 'no_image' => '', 'fade' => '' ), $atts, 'recent_posts' ) ); $allowed_post_types = apply_filters( 'cs_recent_posts_post_types', array( 'post' => 'post' ) ); $type = ( isset( $allowed_post_types[$type] ) ) ? $allowed_post_types[$type] : 'post'; $id = ( $id != '' ) ? 'id="' . esc_attr( $id ) . '"' : ''; $class = ( $class != '' ) ? 'x-recent-posts cf ' . esc_attr( $class ) : 'x-recent-posts cf'; $style = ( $style != '' ) ? 'style="' . $style . '"' : ''; $type = ( $type == 'portfolio' ) ? 'x-portfolio' : 'post'; $count = ( $count != '' ) ? $count : 3; $category = ( $category != '' ) ? $category : ''; $category_type = ( $type == 'post' ) ? 'category_name' : 'portfolio-category'; $offset = ( $offset != '' ) ? $offset : 0; $orientation = ( $orientation != '' ) ? ' ' . $orientation : ' horizontal'; $no_image = ( $no_image == 'true' ) ? $no_image : ''; $fade = ( $fade == 'true' ) ? $fade : 'false'; $js_params = array( 'fade' => ( $fade == 'true' ) ); $data = cs_generate_data_attributes( 'recent_posts', $js_params ); $output = "<div {$id} class=\"{$class}{$orientation}\" {$style} {$data} data-fade=\"{$fade}\" >"; $q = new WP_Query( array( 'orderby' => 'date', 'post_type' => "{$type}", 'posts_per_page' => "{$count}", 'offset' => "{$offset}", "{$category_type}" => "{$category}" ) ); if ( $q->have_posts() ) : while ( $q->have_posts() ) : $q->the_post(); if ( $no_image == 'true' ) { $image_output = ''; $image_output_class = 'no-image'; } else { $image_output = '<div class="x-recent-posts-img">' . get_the_post_thumbnail( get_the_ID(), 'entry-cropped', NULL ) . '</div>'; $image_output_class = 'with-image'; } $output .= '<a class="x-recent-post' . $count . ' ' . $image_output_class . '" href="' . get_permalink( get_the_ID() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ) . '">' . '<article id="post-' . get_the_ID() . '" class="' . implode( ' ', get_post_class() ) . '">' . '<div class="entry-wrap">' . $image_output . '<div class="x-recent-posts-content">' . '<h3 class="h-recent-posts entry-title">' . get_the_title() . '</h3>' . '<span class="x-recent-posts-date date updated">' . get_the_date() . '</span>' . '<span class="vcard author" style="display:none;"><span class="fn">'. get_the_author().'</span></span>' . '</div>' . '</div>' . '</article>' . '</a>'; endwhile; endif; wp_reset_postdata(); $output .= '</div>'; return $output; } add_action('wp_head', 'recent_posts_rebinding'); function recent_posts_rebinding () { remove_shortcode( 'x_recent_posts' ); add_shortcode( 'x_recent_posts', 'x_shortcode_recent_posts_v2' ); }
April 20, 2016 at 6:49 am #891619I have applied the changes. Many thanks!
April 20, 2016 at 7:24 am #891668This reply has been marked as private.April 20, 2016 at 3:23 pm #892431Hi Valerio,
Please try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.
Let us know how it goes.
-
AuthorPosts