Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Forum: Plugins
    In reply to: [Revisr] Git version 1.7.1
    Thread Starter ToreKarlsson

    (@torekarlsson)

    I got some spare time:
    How I fix the problem:

    My hosting company already got Git installed below my own website. When I sign in via SSH and run different commands everything works great. But when revisr tries to execute exactly the same commands it returns error code 127 (no command found). I was able to install a new version of Git (2.2.0) but when I run commands via SSH they are still executed on the old Git.

    My solution
    Revisr tries to get a path via “git parse res ––show–toplevel” but this only returns my public_html path and could not execute any commands. My solution was to force the plugin to execute via my new installation. I changed the path from: “/storage/content/6*/13****/vindpust.com/public_html/” to my new git “/storage/content/6*/13****/bin/git “ (this is where Git 2.2.0 is located on my server).

    I made this changed on three places in the class-revisr-git.php file:
    function current_dir()

    public function current_dir() {
    $dir = exec( '/storage/content/62/135262/bin/git rev-parse --show-toplevel' );
    		if ( $dir ) {
    			return $dir;
    		} else {
    			return ABSPATH;
    		}
    	}

    function is_repo()

    public function is_repo() {
    exec( '/storage/content/62/135262/bin/git rev-parse --show-toplevel', $output, $error );
    		if ( $error ) {
    			return false;
    		} else {
    			return true;
    		}
    	}

    function run()

    public function run( $command, $callback = '', $args = '' ) {
    		// Run the actual Git command.
    
    		$cmd = ( "/storage/content/62/135262/bin/git $command" );
    		//$cmd = escapeshellcmd( "git $command" );
    		$dir = getcwd();
    		chdir( $this->dir );
    		exec( $cmd, $output, $error );
    		chdir( $dir );
    		// If using a callback, initiate the callback class and call the function.
    		if ( $callback != '' ) {…

    And now everything works!

    Is it possible that you can add a source box for the git installation? Like the one to the database in further updates? That would help me alot!

    Thank you!

    If something is strange or missing just post a comment!

    Forum: Plugins
    In reply to: [Revisr] Git version 1.7.1
    Thread Starter ToreKarlsson

    (@torekarlsson)

    Hello!

    I found a solution, I’m sorry but I don’t have the time to explain it right now. I will try to give you a update (maybe it can help someone else?) this weekend.

    /Tore

    Forum: Plugins
    In reply to: [Revisr] Git version 1.7.1
    Thread Starter ToreKarlsson

    (@torekarlsson)

    Hello!

    I run git rev-parse --show-toplevel in my public_html folder (the same folder that holds my WordPress installation).

    And it returned: /storage/content/6*/135***/vindpust.com/public_html

    (Asterisks is my account number at the hosting company.)

    Forum: Plugins
    In reply to: [Revisr] Git version 1.7.1
    Thread Starter ToreKarlsson

    (@torekarlsson)

    Just to explain a little further:

    I get the plugin up and running, I then head over to Dashboard and wait for the loading to complete and then get: “Thanks for installing Revisr! No Git repository was detected, click here to create one.”

    I click “Click here” and get this in the log:
    “Failed to initialize a new repository. Please make sure that Git is installed on the server and that Revisr has write permissons to the WordPress install.”

    Thread Starter ToreKarlsson

    (@torekarlsson)

    Thank you! Will you post when you have a solution?

    Thread Starter ToreKarlsson

    (@torekarlsson)

    Hello!

    Yes that is correct!

    Thread Starter ToreKarlsson

    (@torekarlsson)

    Hello,

    I’m sorry but I can’t send you a URL cause the site is still in development and hidden. I will try to explain a little more:
    I choose to embed this Youtube clip: https://www.youtube.com/watch?v=MPmObvuOMYA and it seems like their is no HI-res image for that one. The problem is that when I try to change this particular post to use a standard res image in the post settings it doesn’t affect anything. It still tries to grab the HI-res image. But when I open the post in a single template it grabs the right image resolution and everything works.

    In a coincidence I tried to change the last published post meta data in my database to standard res instead of HI-res and every one of the Youtube videos got standard resolution images. When I changed it back all videos tried to grab the HI-res image again and because not all has one they failed.

    Any idea?

    Thread Starter ToreKarlsson

    (@torekarlsson)

    Does anyone know any solution to this problem?

    Thread Starter ToreKarlsson

    (@torekarlsson)

    Thanks!

    Thread Starter ToreKarlsson

    (@torekarlsson)

    Hello!

    Thank you for your prompt reply, I got it working!

    Unfortunately I ran in to more problems… My theme uses infinity scroll, is their some way to make this plugin work with infinity scroll? Can I make a call to the plugin so it activates it self after the content have been loaded?

    Best regards!

Viewing 10 replies - 1 through 10 (of 10 total)