Urgent...my site is down...here is the latest plugin updates...let me know...

Hi folks,
Site: bit.ly/1sUaNb9

I am unsure if this is related but I installed this plugin minutes ago (and did not activate it at all network or subsite...just installed in). See the last part of this thread of what the plugin author said to do but he said he fixed it etc. I did not change code manually at all. I just installed the plugin and did not activate. https://wordpress.org/support/topic/the-plugin-prevent-wordpress-seo-and-screen-options-from-working?replies=7

I just deleted the plugin from the network.

The admin area works fine. I have added support access for you as well in the dashboard.

Like I said, I am not sure if the plugin install is the cause (but considering the issues with it recently it could be...see above thread).

Lastly, here are the latest plugin updates that have take place the last 2 days (do you see issues or getting reports with any of yours etc)?

Let me know how we can get it back up asap please.

:slight_smile:

  • Greg

    @patrick

    Scrambling to fix...

    The reason why the site shows is that my host removed all plugins without my letting me know...I have to remember all the plugins we had network activated vs. on the subsite(s) only.

    I have some info received from pingdom.com (a good bit I will not post here yet and if I do I would probably send to you direct if needed). The basic error was:

    500 Internal Server Error
    Date: Thu, 29 Jan 2015 15:06:10 GMT
    Server: Apache
    Expires: Thu, 19 Nov 1981 08:52:00 GMT

    The reason it shows now is because no plugins are showing...what a mess...lol.

    I will be in touch...have to get a maintenance page up asap...

    :slight_smile:

  • Greg

    @Patrick

    Wow...that was a ordeal...

    It is back up. (I had to painstakingly go through each an every plugin to activate, reset settings on some plugins, and also a couple of subsites).

    Could you take a look at the below and let me know your opinion? I am 95% sure it is this plugin below but would like your thoughts too. Please, of course, do not try to add it to my site at all again...lol...just looking for your thoughts based on the below:

    Thanks for the follow up...I really would like to isolate it...and I think I have but need your confirmation (BUT please do not change anything on any of our Wordpress installations...I am just asking you opinion and based on any server insights you have). This was installed immediately before the issues (not sure if it was this or a coincidence by I have my suspicions and would like to get your opinion)...please read all of the below first before looking further into it...

    http://bit.ly/1z9ibpM (see the last part of my support ticket here)...I notice a lot of other support issues since WP 4.1 ... I don't know exactly what he changed on it in the plugin but look at the code that was posted (do you see any code issue that would cause the site to go down with a blank white screen)?

    Are you able to see if this was for sure the plugin (I am 95% sure).

    However, I installed it but did NOT activate it though on the network or subsites (but I do know some plugins affect sites even if not activated)...

    If you could help determine that would be great (given the developer having several other issues too in other support issues since Wordpress 4.1 came out)...

    Thanks @Patrick

    LASTLY, do you know of any alternative and really great plugins that would do the same or better job? His was good when it was working...

    :slight_smile:

    Greg

  • Patrick

    Hi again @Greg

    I hope you're having a great day!

    Calling specific versions of jQuery in a plugin (or theme) is simply bad practice and it often winds up conflicting with the latest jQuery libraries that are built-into WordPress. So yes, I would recommend shying away from that plugin.

    If all you need there is a handy login/logout link in your theme's menu, you can add the following snippet to your theme's functions.php file:

    //Add login/logout link to navigation menu
    function add_login_out_item_to_menu( $items, $args ){
    
    	//Change theme location to your theme location name.
    	if( is_admin() ||  $args->theme_location != 'primary' )
    		return $items; 
    
    	$redirect = ( is_home() ) ? false : get_permalink();
    	if( is_user_logged_in( ) )
    		$link = '<a href="' . wp_logout_url( $redirect ) . '" title="' .  __( 'Logout' ) .'">' . __( 'Logout' ) . '</a>';
    	else  $link = '<a href="' . wp_login_url( $redirect  ) . '" title="' .  __( 'Login' ) .'">' . __( 'Login' ) . '</a>';
    
    	return $items.= '<li id="log-in-out-link" class="menu-item menu-type-link">'. $link . '</li>';
    }add_filter( 'wp_nav_menu_items', 'add_login_out_item_to_menu', 50, 2 );

    If you want to ensure that a login/logout link gets added to the menu on all sites in your network, regardless of the theme that is active on each site, paste the above code in a new text file and save it as login-out-menu.php (or any other name if you prefer).

    Add a plugin header to the top of that file like this:

    <?php
    /*
    Plugin Name: Login/Out in Menu
    Description: Adds login-logout links to navigation menus
    Author: Patrick Cohen
    Version: 1.0
    */

    Then add a new if statement for the theme_location of each theme available on your site like so:

    if( is_admin() ||  $args->theme_location != 'primary' )
    if( is_admin() ||  $args->theme_location != 'main_navigation' )

    Save and upload that file to your wp-content/plugins directory. Then go to Plugins in your network admin and network-activate your new custom plugin. Or you could upload the file to wp-content/mu-plugins so it network-activates automatically and cannot be deactivated unless deleted via FTP.

    Or just activate it on the site(s) where you want it, and leave it up to other site(s) admins to decide if they want to activate it on their sites.

    To make your life a little easier, I've attached a file you can try out on your site. It's already set up to automatically add the link to most themes as the very standard 'primary' theme_location is declared, as well as 'main_navigation' (Avada & many others) and 'primary-menu' (Divi and several others). I believe you're using Divi on your site, so it should work right off the bat. If not, pop it open in a text editor and add a new if statement to it.

    You can see it working here:
    http://music.patrickcohen.net/

  • Patrick

    @Greg

    This is a very simple little bit of code that adds zero overhead to your site (I like 'em that way), and it has no admin options built-in to customize redirects per-site. It simply redirects users back to the page they were on when they login/out.

    But you can change the redirect by modifying the following line:
    $redirect = ( is_home() ) ? false : get_permalink();

    ...and inserting an absolute URL like so:
    $redirect = "http://music.patrickcohen.net/2015/01/27/hello-world/";

    That will redirect users to that specific post every time they login or out.

    The drawback to that is that you would need to write the code specifically for each site. Not ideal at all. :slight_smile:

    An alternative would be to remove the redirect altogether from that code, and use one of my fav plugins to control your redirects: Peter's Login Redirect
    https://wordpress.org/plugins/peters-login-redirect/

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.