• Resolved stillpointdigitalpress

    (@stillpointdigitalpress)


    Okay. This is a weird one.

    I tried for the first time to develop the update to one of my sites locally (on MAMP). Once I was happy, I FTP’d the files up to my web host (BlueHost), uploaded the database, pointed the top-level .htaccess file to the new version of the site, and all looked beautiful.

    Only two problems: when I try to access some of the plugin control panels in the Dashboard, I either get the White Screen of Death, or nothing happens – I stay wherever I was.

    When I try to look at pages or WooCommerce Products or any other “custom” post type (pages are a custom post type? really?), I am shunted to the Posts listing. Same happens if I click on the “Edit Page” or “Edit Product” button in the JetPack nav bar.

    Other weirdness: I can’t activate or deactivate plugins by clicking on the “Activate/Deactivate” link in the plugins list but I can select the plugin and activate/deactivate/delete it by clicking on the bulk action button. I can’t upload plugins (I am simply shunted to the Add Plugin… page) — the same for trying to search for plugins. I am simply shunted back to the main Add Plugin… screen.

    I wanted to start over with a fresh install instead of uploading the whole directory/database, since I thought perhaps the MySQL file had gotten corrupted somehow, but I can’t use the export tool to download the site (when I click on it nothing happens). I still have the local version, and I can use the download tool on that version, but if I try to use that to build a new site, it won’t load the images and other files, since the MAMP version of the site is behind my home firewall — and I’d have to use dynamic DNS to link to it anyway, which is a headache.

    At this point, everything I’ve tried to fix things (including looking through the database in phpMyadmin for localhost:8888 links) has either done nothing or made things worse.

    Help!

    ETA: Just to be clear: I’ve tried turning off or deleting all plugins. I tried to install all of the plugins fresh (though of course I had to do that by downloading the files and uploading them to the plugins folder, since I can’t use the WP plugin dashboard. I still have the problems.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter stillpointdigitalpress

    (@stillpointdigitalpress)

    I’ve now tried two fresh installs — with the same result.

    The site is in a subdirectory — it’s the primary site on the account, so I use htaccess and a rewrite rule to redirect the base URL to the subdirectory. I’ve done this before and it worked — not now. The problem seems to happen when I change the “site URL” and “home” in the General settings menu. Once I get rid of the subdirectory and attempt to enter the main URL there, all hell breaks loose. CSS disappears, and the console informs me that “jQuery is not defined” over and over on every page that I attempt to access — but ONLY on wp-admin. For the rest of the site, jquery works just fine.

    If I attempt to reset the URL (in myPHPadmin, because I can’t get at the General Settings panel anymore), I get dropped into an endless signin loop. So I can’t reverse the problem — which tells me I’m missing something.

    FYI, here’s the .htaccess file in the root folder (the one that points to the new subdomain):

    # rule for a specific 'filepathname'
    RewriteCond %{HTTP_HOST} ^(www\.)?stillpointeros\.com$ [NC]
    # exclude specific calls for the subfolder in question or for files or folders that exist in the root
    RewriteCond %{REQUEST_URI} !^/sev22/wordpress/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ sev22/wordpress/$1#
    
    # rule for the domain root
    RewriteCond %{HTTP_HOST} ^(www\.)?stillpointeros\.com$
    RewriteRule ^(/)?$ sev22/wordpress/index.php [L]

    (I left a couple of lines out of that which point to other sites — they really can’t possibly be involved.)

    And here’s the .htaccess for the installation folder:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [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]

    I’ve tried commenting out the filename (!-f) and directory (!-d) exclusions in the root htaccess file. I’ve tried changing the RewriteBase in htaccess in the WP folder to the full path. No luck.

    For now, I’m out of ideas.

    Thread Starter stillpointdigitalpress

    (@stillpointdigitalpress)

    Oh — and when I add the following to the wp-config.php file:

    define('CONCATENATE_SCRIPTS', false);

    I get CSS and JavaScript back in wp-admin — but I can’t access any pages, comments, products, etc. I am dropped into the “All Posts” panel.

    Thread Starter stillpointdigitalpress

    (@stillpointdigitalpress)

    Okay — one small mystery narrowed down.

    The problem with all attempts to edit or view pages, products, etc., seems to be tied to the /wp-admin/edit.php file. No matter what parameter gets passed to the file, it displays posts.

    Here’s the code in the edit.php file that I think isn’t working:

    unset( $_redirect );
    
    if ( 'post' != $post_type ) {
    	$parent_file = "edit.php?post_type=$post_type";
    	$submenu_file = "edit.php?post_type=$post_type";
    	$post_new_file = "post-new.php?post_type=$post_type";
    } else {
    	$parent_file = 'edit.php';
    	$submenu_file = 'edit.php';
    	$post_new_file = 'post-new.php';
    }

    Now, my PHP isn’t strong enough to now why that isn’t working. But it isn’t.

    Thread Starter stillpointdigitalpress

    (@stillpointdigitalpress)

    Solved.

    How?

    I moved the whole installation up to the root directory and got rid of all of the htaccess tricks.

    Ah, well. Sometimes it doesn’t pay to be too clever.

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

The topic ‘Dashboard: All custom post types point to regular posts’ is closed to new replies.