• Resolved jfrankli

    (@jfrankli)


    Is there a way to activate the JetPack plugin on my locally running copy of WordPress on my MacBook? I saw a message that said “site_inaccessible”. Error Details: The Jetpack server was unable to communicate with your site [IXR -32300: transport error: http_request_failed Couldn’t resolve host ‘wptest’]

    Is there a way to make this work in my local development environment? The web site that I run is only locally accessible on my Mac.

    https://www.ads-software.com/extend/plugins/jetpack/

Viewing 15 replies - 16 through 30 (of 35 total)
  • msenate

    (@msenate)

    Though I agree this thread should not be resolved, and the hack above is not the desired functionality…

    I Turned those changes into a simplified patch I’m employing:

    Index: jetpack/jetpack.php
    ===================================================================
    --- jetpack/jetpack.php (revision 3732)
    +++ jetpack/jetpack.php (working copy)
    @@ -272,7 +272,7 @@
             * Is Jetpack active?
             */
            function is_active() {
    -               return (bool) Jetpack_Data::get_access_token( JETPACK_MASTER_USER );
    +               return true; // return (bool) Jetpack_Data::get_access_token( JETPACK_MASTER_USER );
            }
    
            /**
    @@ -2211,7 +2211,7 @@
                    $role = $this->translate_current_user_to_role();
                    $is_connected = Jetpack::is_active();
                    $user_token = Jetpack_Data::get_access_token($current_user->ID);
    -               $is_user_connected = $user_token && !is_wp_error($user_token);
    +               $is_user_connected = true; // $user_token && !is_wp_error($user_token);
                    $is_master_user = $current_user->ID == Jetpack::get_option( 'master_user' );
                    $module = false;
            ?>

    To apply the patch use, save the snippet above as jetpack_localhost.diff then issue this command:

    patch -p0 -i ~/jetpack_localhost.diff

    +1

    Beren

    (@berenerchamion)

    +1 for local development.

    Plugin Contributor Ian Dunn

    (@iandunn)

    +1.

    I’m trying to debug a conflict between Jetpack and one of my plugins, and it’s a pain in the ass because I can’t step through the code with a real debugger.

    The hack from WPSE gets rid of the warnings, but doesn’t seem to make Jetpack run exactly the same way that it does when it’s actually connected to WordPress.com. Individual modules may also need to be hacked, like force_user_connection() in publicize/publicize-jetpack.php.

    I think there should be a filter that devs can set in order to make Jetpack behave exactly as if it’s fully connected, including all the modules. e.g.,

    add_filter( 'jetpack_imitate_connected', '__return_true' );

    +1

    +1 | need it for local website building on bitnami wordpress

    Would really love a local version to test with.

    Having all of those features available on my site online is brilliant, but there is a major inconvenience if you want to use anything from Jetpack to feature in a theme that’s currently in development.

    +1

    Who marked this as resolved?

    +1 from me..
    Local development is really important, I wonder why there is still no pure solution for this.
    The hack is a temp solution, but Jetpack developers should have given/suggested such a similar trick to us until a stable one is out… Instead, we have to look out for what other folks have to suggest..

    Not sure if this is too late for many of you folk but after much the same frustration I came across this today…

    https://www.wordimpressed.com/plugins/how-to-use-wordpress-jetpack-for-local-development/

    I haven’t needed to test all the modules but it does work on two or three I do need.
    That said I’m having trouble serving up images to my ‘Tiled Gallery’ module…
    perhaps something to do with the required ‘extra-special processing’ ?

    +1

    +1
    This would be very helpful for testing.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Jetpack 2.2 cannot be used in a local environment yet, but we worked on this feature, and it will be available in the next Jetpack release.

    You can already test it by installing the development version of Jetpack, available here:
    https://www.ads-software.com/extend/plugins/jetpack/developers/

    You can find out more about the new development mode here:
    https://plugins.trac.www.ads-software.com/changeset/674577
    https://plugins.trac.www.ads-software.com/changeset/676269

    +1 … me too… go local!!!!

    i’m running the the dev version now with
    define ('JETPACK_DEV_DEBUG', true);
    in my wp-config, and so-far so-great.

    thanks for addressing this pressing need.

Viewing 15 replies - 16 through 30 (of 35 total)
  • The topic ‘[Plugin: Jetpack by WordPress.com] Local testing version’ is closed to new replies.