Pro-Sites 3.2.1: upgrade page dismiss error

Hi Guys,

One of my users did inform me about an error. I recreate the error by creating a new site. When you click on “No, I will continue with a free site for now” you will get a blank screen for there is a “/” missing in the url between wp-admin and index.php:

http://mysite.com/wp-adminindex.php?psts_dismiss=1

Same problem if one clicks one “bulk-upgrades”:

http://mysite.com/wp-adminadmin.php?page=psts-bulk-upgrades

regards

  • 3SixtyEvolve
    • New Recruit

    Hi @gdharre

    Greetings from the WPMU DEV Support Team and thank you for being a member of our community.

    I am not able to recreate this error, so is it possible to provide me with a link to your site so that I can have a look at this myself?

    If you prefer to keep the link private you can send it via our Contact Form, for my attention.

    Thank you and look forward to receive your feedback.

    Gina

  • gdharre
    • Design Lord, Child of Thor

    PS: I made some code changings:

    //show dismiss button link if needed
    if (get_blog_option($blog_id, 'psts_signed_up') && !apply_filters('psts_prevent_dismiss', false) ) {
    $content .= '<tr class="psts_level level-free">
    <td valign="middle" class="level-name"><h3>'.$this->get_setting('free_name', __('Free', 'psts')).'</h3></td>';
    $content .= '<td class="level-option" colspan="'.count($periods).'">';
    $content .= '<a class="pblg-checkout-opt" style="width: '.$free_width.'" id="psts-free-option" href="'.get_admin_url($blog_id,'/', 'http').'/index.php?psts_dismiss=1'.'" title="'.__('Dismiss', 'psts').'">'.$this->get_setting('free_msg', __('No thank you, I will continue with a basic site for now', 'psts')).'</a>';
    $content .= '</td></tr>';
    }

    …which is probably not correct (but it gives as result the correct url)

    Original is:

    //show dismiss button link if needed
    if (get_blog_option($blog_id, 'psts_signed_up') && !apply_filters('psts_prevent_dismiss', false) ) {
    $content .= '<tr class="psts_level level-free">
    <td valign="middle" class="level-name"><h3>'.$this->get_setting('free_name', __('Free', 'psts')).'</h3></td>';
    $content .= '<td class="level-option" colspan="'.count($periods).'">';
    $content .= '<a class="pblg-checkout-opt" style="width: '.$free_width.'" id="psts-free-option" href="'.get_admin_url($blog_id, 'index.php?psts_dismiss=1', 'http').'" title="'.__('Dismiss', 'psts').'">'.$this->get_setting('free_msg', __('No thank you, I will continue with a basic site for now', 'psts')).'</a>';
    $content .= '</td></tr>';
    }

  • 3SixtyEvolve
    • New Recruit

    Hi @gdharre

    Just a quick note to say that I didn’t get any email via the Contact Form marked for my attention since you posted to the forum with the update.

    Please resend the information to gina at incsub dot com and I will have a look at it. Note that it’s nearly time for me to get some shuteye, so if I don’t get to it today, I will look out for your email tomorrow.

    Once I have the link and other information I will also provide feedback on the code (will review it with the Developer).

    Talk soon again!

    Gina

  • Mason
    • DEV MAN’s Sidekick

    Hiya gdharre,

    Just looked into this one myself and with the latest version I did not encounter this issue. I ran a couple tests and wasn’t able to recreate it.

    You’re sure it’s only happening on free sites? Could be a server setup issue. I’m going to ask the developer to drop in with any thoughts he may have.

    Thanks!

  • Aaron
    • CTO

    It definitely is something configured weird with your wp install. That’s a core wp function so should take care of the slash for you. I would guess this might be affecting other links n wp as well.

    Is this a subdomain or subdirectories install? What are the values in the db for site_url and home_url in a problem blogs options table?

  • gdharre
    • Design Lord, Child of Thor

    Greetings all,

    ohh “fantastic”

    okay, it’s an install with subdomains. (On our Server nginx is running)

    This is how the ngnix.conf it is configuered:

    user  nginx;
    worker_processes 4;
    worker_rlimit_nofile 100000;
    error_log /var/log/nginx/error.log;
    pid /var/run/nginx.pid;

    events {
    worker_connections 1024;
    use epoll;
    }

    http {
    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    log_format main '$remote_addr - $remote_user [$time_local] "$request" '
    '$status $body_bytes_sent "$http_referer" '
    '"$http_user_agent" "$http_x_forwarded_for"';

    access_log /var/log/nginx/access.log main;

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    server_tokens off;
    gzip on;
    #gzip_static on;
    gzip_comp_level 9;
    gzip_min_length 256;
    keepalive_timeout 65;

    server {
    listen 80;
    server_name lakajira.com *.lakajira.com;
    client_max_body_size 256m;
    client_body_buffer_size 256k;
    server_name_in_redirect off;

    location / {
    root /srv/http/lakajira.com/;
    index index.php;

    if (!-e $request_filename) {
    rewrite ^.*/files/(.*)$ /wp-includes/ms-files.php?file=$1 last;
    rewrite ^.+?(/wp-.*) $1 last;
    rewrite ^.+?(/.*.php)$ $1 last;
    rewrite ^ /index.php last;
    }
    }

    location ~ .php$ {
    root /srv/http/lakajira.com/;
    index index.php;
    fastcgi_pass unix://var/run/php-fpm/php-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    }
    }

    # Load config files from the /etc/nginx/conf.d directory
    include /etc/nginx/conf.d/*.conf;

    }

    What else could be configured weird?

    kind regards

    Dorina

  • gdharre
    • Design Lord, Child of Thor

    Greetings Aaron,

    yes I checked wp_config… this is a part of the file:

    define('WP_DEBUG', false);
    define('WP_ALLOW_MULTISITE', true);
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', true );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'lakajira.com' );
    define( 'PATH_CURRENT_SITE', '/' );

    It’s frustrating.. you said it’s a core function of wordpress, do you know any other plugin or theme what uses that function, or how else we could test the function to reproduce the error with another than your plugin? It’s weird, isn’t it?

    If it is a core function, it’s not very probably that there is a conflict with another installed plugin?

  • Aaron
    • CTO

    It’s used throughout core, but normally without a special path passed. I found one place though, if you visit the import page on a subblog and try to import with one that’s not installed it shows this message:

    This importer is not installed. Please install importers from <a href="%s">the main site</a>

    Can you see if that link is broken for you?

  • gdharre
    • Design Lord, Child of Thor

    Found it!!!

    Buddypress Multilingual does cause that issue!

    Okay.. now your plugin works and we have another problem now… with using buddypress in different languages *sighs*

    Anyway thank you for your great help!

  • Mason
    • DEV MAN’s Sidekick

    Great that you got it sorted!

    Re: BuddyPress Multilingual – you might checkout WPML: http://wpml.org/ They do really terrific work and we have integration with some of our products over there. Not sure about BuddyPress but would be a good place to start.

    Thanks. I’m marking this one as resolved. If you have any further difficulties, feel free to re-open this thread or open a new ticket.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.