WordPress.org

Forums

WordPress Landing Pages
[resolved] Error 500 on plugin activation (10 posts)

  1. Carlo
    Member
    Posted 1 year ago #

    Hi Guys,
    i keep getting an error 500 from the server when i try to activate for the first time the Landing Pages plugin. Is it something you are already aware of or more likely there's something wrong with my wordpress website?

    Cheers,
    Carlo

    http://wordpress.org/plugins/landing-pages/

  2. David Wells
    Member
    Plugin Author

    Posted 1 year ago #

    What does your htaccess file look like?

  3. Carlo
    Member
    Posted 1 year ago #

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

  4. Loggy
    Member
    Posted 1 year ago #

    Landing Page modifies the .htaccess file, which it doesn't say in the documentation. This may be OK as long as (a) the file is writeable and (b) obviously apache is in use. I am using apache and nginx in reverse proxy and on installing this plugin got the message:

    400 Bad Request
    Request Header Or Cookie Too Large
    ________________________________

    nginx

    It also caused the Google Analytics Dashboard to fail.

    I deactivated it and everything returned to normal but deactivation leaves the .htaccess file modified with the following three lines:

    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 ^langing-page=([^/]*)? /wp-content/plugins/landing-pages/modules/module.redirect-ab-testing.php?permalink_name=$1 [QSA,L]

    In my configuration .htaccess file is correctly obeyed as nginx is only used to deliver static files and cached files.

    If a plugin will only work with apache and if it modifies the .htaccess file in any way, this should be stated. It should also return .htaccess when deactivated. And as many people are now using nginx either raw or in reverse proxy, it may be worth providing some rewrites in that syntax.

  5. Hudson Atwell
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Loggy,

    We use the WordPress core PHP api to add htaccess rules to the .htaccess file. We do not use fopen or fwrite though. I am under the impression that all WordPress installs regardless of the server makes use of .htaccess rule to operate permalinks. I'm not positive though. Maybe catch me up on how this works?

    In the next version we've added a flush permalink rules to the deactivation hook so this should take care of lp's contribution to rewrite rules and clean the htaccess file.

    @Carlo,

    Try deleting and updating the latest version. I don't see our rules in your htaccess file and the file does not look corrupted so I'm not sure off the bat why the 500 error is throwing.

  6. Ready! Developer
    Blocked
    Posted 1 year ago #

    Hello.
    I have next error:
    Fatal error: Cannot redeclare lp_render_global_settings() (previously declared in E:\server\www\wordpress_test\php\wp-content\plugins\landing-pages\functions\functions.admin.php:469) in E:\server\www\wordpress_test\php\wp-content\plugins\landing-pages\modules\module.global-settings.php on line 400

    Regards,
    Alexey.

  7. David Wells
    Member
    Plugin Author

    Posted 1 year ago #

    Please delete and redownload the plugin. This should fix your issue

  8. Ready! Developer
    Blocked
    Posted 1 year ago #

    Also, I see this error:
    Fatal error: Cannot redeclare tgmpa() (previously declared in E:\server\www\wordpress_test\php\wp-content\plugins\landing-pages\libraries\class-tgm-plugin-activation.php:975) in E:\server\www\wordpress_test\php\wp-content\themes\ready-themes\ready_ecommerce_theme\plugin-activation.php on line 831
    when trying to edit taxonomy.

    Regards,
    Alexey.

  9. David Wells
    Member
    Plugin Author

    Posted 1 year ago #

    Our tgmpa() function is wrapped in a conditional

    if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {

    It should not be conflicting with your theme unless your theme is not conditionally checking if that class hasn't already been defined.

    Can you look in that file E:\server\www\wordpress_test\php\wp-content\themes\ready-themes\ready_ecommerce_theme\plugin-activation.php and check?

  10. Ready! Developer
    Blocked
    Posted 1 year ago #

    Yes, I already checked this issue and resolved. Thnx for responding. Strange only tone thing - that function tgmpa() is wraped into condition that you described, but no in if(!function_exists('tgmpa'))

    Regards,
    Alexey.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress Landing Pages
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic