Home Forums Landing Pages [Landing Pages] Landing Page Plugin Crashing Site

This topic contains 9 replies, has 3 voices, and was last updated by  Hudson Atwell 1 month, 3 weeks ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #131158

    emilyferguson60
    Participant

    I am using WordPress 4.8.1 running X – Child Theme theme.I currently have the landing page plugin installed, version 2.6.1. The upgrade is version 2.6.2. When I upgrade the plugin, I can no long preview pages via the visual composer. It also crashes all my website except the home page.

    My WordPress is installed on a subdirectory. The code is being added to the htaccess file is not properly accounting for it (even though it’s defined in the WordPress settings.)

    Please advise.

    #131163

    Hudson Atwell
    Keymaster

    Hi Emily

    To confirm, is it a broken htaccess file that causes the downed site? What happens if you delete it and regenerate it by resaving the permalinks? Doesthe site restore?

    If you upload x theme here I’ll also give it a try if you like.

    Kind regards,
    Hudson

    #131241

    jthomson
    Participant

    Hi Hudson,
    I’m giving Emily a hand with this issue. I think the problem may be that we have wordpress in a subdirectory, which requires manually creating the htaccess file. Even though the subdirectory is named in the WordPress settings, it seems that Landing Pages re-writes the htaccess file in a way that erases the necessary bits from the page I linked.
    Thanks again for your help!
    -john

    #131244

    Hudson Atwell
    Keymaster

    Hi John,

    Landing pages is rewriting the sub-directory htaccess or the parent directory htaccess? I believe you mean the latter. If so will you share a copy of the original htaccess file and the htaccess file after it has been modified by the landing page plugin additions? That might help us discover what is wrong.

    Kind regards,
    Hudson Atwell

    #131279

    jthomson
    Participant

    Hi Hudson,
    Thanks for the reply! You are correct that it’s the parent directory that’s being altered. If the original has the “# BEGIN WordPress” it is replaced, and without it the plugin adds the code after the htaccess directives.

    Here’s what we have, as instructed by the link in my previous post:

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(www.)?ourDomain.org$
    RewriteCond %{REQUEST_URI} !^/wordpress/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /wordpress/$1
    RewriteCond %{HTTP_HOST} ^(www.)?ourDomain.org$
    RewriteRule ^(/)?$ wordpress/index.php [L] 
    </IfModule>

    Appreciate the help,
    -john

    #131284

    Hudson Atwell
    Keymaster

    Hi John,

    I have a few questions that should help me understand better. There’s a few aspects I’m not clear on. Maybe you could help?

    Is the htacces contents that you shared above the htaccess file sits in the directory parent to the WordPress subfolder, before landing pages plugin modifies it?

    And the actual htaccess in the wordpress sub directory is not being altered?

    Are you running WordPress multisite? (I don’t think you are from what I have read, but just checking)

    You mention a link for review, will you reshare it? I can’t seem to find it.

    Is this behavior recent problem only occurring after the update or has it always been a problem? Have you been able to update before without this happening?

    And one last one, will you share what the htaccess file looks like after it has been broken? Maybe I will be able to find out what has gone wrong.

    Kind regards,
    Hudson Atwell

    #131407

    jthomson
    Participant

    Hi Hudson,
    Apologies for the delay…busy time of year.

    You are correct that the htaccess file that is changed is in the webroot folder, and WordPress is installed in the /wordpress subdirectory (and the htaccess here is unchanged, no multi-site here). The WordPress folks document this in “Giving WordPress its own directory.”

    The behavior presented itself when we moved hosts (though I’d have to defer to Emily on whether it was used on the old host). I the new host somehow handles the root domain differently.

    Here’s what Landing Pages changes the root htaccess to:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{QUERY_STRING} !lp-variation-id
    RewriteRule ^go/([^/]*)/([0-9]+)/ /go/$1?lp-variation-id=$2 [QSA,L]
    RewriteCond %{QUERY_STRING} !lp-variation-id
    RewriteRule ^go/([^/]*)? /wp-content/plugins/landing-pages/modules/module.redirect-ab-testing.php?permalink_name=$1  [QSA,L]
    RewriteRule ^landing-page=([^/]*)? /wp-content/plugins/landing-pages/modules/module.redirect-ab-testing.php?permalink_name=$1 [QSA,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    I suspect there might be something we could add to the htaccess code to make it work, but my skills in that department are lacking. Thanks again for your help!

    #131409

    Hudson Atwell
    Keymaster

    Try adding the subdirectory before /wp-content/ in the htaccess below. So it looks like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{QUERY_STRING} !lp-variation-id
    RewriteRule ^go/([^/]*)/([0-9]+)/ /go/$1?lp-variation-id=$2 [QSA,L]
    RewriteCond %{QUERY_STRING} !lp-variation-id
    RewriteRule ^go/([^/]*)? /CHANGENAME/wp-content/plugins/landing-pages/modules/module.redirect-ab-testing.php?permalink_name=$1  [QSA,L]
    RewriteRule ^landing-page=([^/]*)? /wp-content/plugins/landing-pages/modules/module.redirect-ab-testing.php?permalink_name=$1 [QSA,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    #131480

    jthomson
    Participant

    Hi Hudson,
    That didn’t quite work, but I was able to find the solution. I manually placed the “what Landing Pages changes the root htaccess to” code that I mentioned before in the WordPress subdirectory with the addition you suggested. The htaccess code at the root level (mentioned earlier) stayed the same, and I locked it with permissions. Now everything is working great!
    If I can make a feature suggestion, it would be great if the plugin attempted to alter the htaccess file of WP_SITEURL instead of WP_HOME we (and others) would be all good.
    Thanks again for the help — we couldn’t have figured it out without your assistance.
    -john

    #131484

    Hudson Atwell
    Keymaster

    Very good John thank you!

    I will continue to look over what might have caused this to happen. At the moment I do not understand why the root directory htaccess would be modified by WordPress. I do not think it’s standard behavior and checked the cope and could not find that we were doing it outside of recommended standards.

    So this one is still a mystery to me.

    It’s always a pleasure,
    Hudson

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

The topic ‘[Landing Pages] Landing Page Plugin Crashing Site’ is closed to new replies.