• Resolved abreusky

    (@abreusky)


    Hi!

    I am having an issue with the email in the sharing module.

    When I click the icon, it opens a new window with ” ?shared=email&msg=fail ” on the end of the link.

    Before, I was customising the related posts module doing a wrong thing (changing the parameters on the real Jetpack .php files). I was having this error with email and I thought it was because of this “wrong customisation”.

    Then I reinstalled Jetpack and now I am using only snippets to customise it.

    But I still have the email sharing issue.

    I was visiting a website one of these days and I saw how BEAUTIFUL the email sharing works, with a mini popup window, and I am so anxious to get that! It is so cool! ??

    What can I do to fix this small issue with the email sharing?

    This is my website.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    I believe we’ve talked about this issue before. You can check the previous thread you started about this to find what’s causing the issue:
    https://www.ads-software.com/support/topic/email-sharing-not-working-3/

    If you have more questions, don’t hesitate to reply there.

    Thread Starter abreusky

    (@abreusky)

    Hi Jeremy!

    The cache plugins i tried were giving me several other problems.

    I gave up and deleted them.

    That’s why i posted a new thread. I also removed the customisations I was doing directly in the .php files of Jetpack sharing module.

    Even doing that, are the scrips errors still happening?

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Yes, the errors are still there:
    https://i.wpne.ws/itU1

    Thread Starter abreusky

    (@abreusky)

    hmmmm! :-/

    scripts are out of my understanding.

    I’ll try to fix this maybe in a “rough” way

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    The problem seems to be caused by your theme; it loads an old version of jQuery instead of using the version that comes bundled with WordPress.

    It can create multiple conflicts with WordPress and with other plugins like Jetpack. You can read more about it here:
    https://www.ads-software.com/support/topic/troubleshooting-wordpress-35-master-list?replies=4#post-3547424

    To solve the issue, you’ll want to look for the function loading jQuery in your theme’s header.php file, or in the functions.php file. Once you find that function, you can remove it and enqueue the proper version of jQuery as explained here:
    https://codex.www.ads-software.com/Function_Reference/wp_enqueue_script

    If you do not feel comfortable editing PHP files, you can also contact the theme author and ask them to solve the issue.

    Thread Starter abreusky

    (@abreusky)

    Indeed I’m using a “defunct” theme, and there’s no support for it.

    But now that you gave me a path, I think i’ll manage to fix this, using a lot of Google ??

    Thanks again!

    Thread Starter abreusky

    (@abreusky)

    Hi Jeremy!

    I found that my theme is using jquery 1.6.1

    wp_register_script( 'jquery', get_bloginfo('stylesheet_directory').'/libs/jquery-1.6.1.min.js' );

    Which jquery version is WP 4.7.1 using? I tried to discover but couldn’t find it.

    Thread Starter abreusky

    (@abreusky)

    1.12.4? i think it’s this one

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    You can completely remove that line, and replace it with wp_enqueue_script( 'jquery' );. No need to specify a version, there is only one version of jQuery shipped with WordPress.

    Thread Starter abreusky

    (@abreusky)

    There is already a wp_enqueue_scrpt( 'jquery' );

    the whole “script” was this (it’s the only reference to jQuery in functions.php):

    require_once ( get_stylesheet_directory() . '/theme-options.php' );
    if (!is_admin()) {
    	wp_deregister_script( 'jquery' );
    	wp_register_script( 'jquery', get_bloginfo('stylesheet_directory').'/libs/jquery-1.6.1.min.js' );
    	wp_enqueue_script( 'jquery' );
    	wp_enqueue_script( 'jquery_masonry', get_bloginfo('stylesheet_directory').'/libs/jquery.masonry.min.js' );
    	wp_enqueue_script( 'jquery_ui', get_bloginfo('stylesheet_directory').'/libs/jquery-ui.custom.min.js' );
    	
    	// javascript for infinite scroll
    	$imbalance2_theme_options = get_option('imbalance2_theme_options');
    	if ( $imbalance2_theme_options['navigation'] == 1 )
    	{
    		wp_enqueue_script( 'jquery_infinitescroll', get_bloginfo('stylesheet_directory').'/libs/jquery.infinitescroll.min.js' );
    	}
    }

    what do you think?

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Try removing these 2 lines for now:

    wp_deregister_script( 'jquery' );
    	wp_register_script( 'jquery', get_bloginfo('stylesheet_directory').'/libs/jquery-1.6.1.min.js' );
    Thread Starter abreusky

    (@abreusky)

    Hey!

    it did work! the email popup window is opening!

    but the layout of the homepage gets “messy”

    have a look

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    It looks like your theme also adds additional JavaScript, but doesn’t do it the right way. It generates additional errors when you use the standard jQuery library that is ships with WordPress.

    You can read more about this:
    https://pippinsplugins.com/why-loading-your-own-jquery-is-irresponsible/

    At this point, I would suggest looking for an alternative theme, possibly from the WordPress theme directory since you can be sure to have high quality themes there:
    https://www.ads-software.com/themes

    Another alternative would be to try to work around the problem by adding the following to your theme’s header.php file, before the <?php wp_head(); ?> call:

    
    <script type="text/javascript">
    $ = jQuery.noConflict(true);
    </script>
    

    I can’t guarantee that more problems won’t appear later, though.

    Thread Starter abreusky

    (@abreusky)

    yes, it’s not a good idea to use an old theme, too many bugs.

    I’ll have to change this one :-/

    thanks for your help, Jeremy!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Sharing email popup not working’ is closed to new replies.