WordPress.org

Ready to get started?Download WordPress

Forums

Broken root site admin (15 posts)

  1. jtt89
    Member
    Posted 2 years ago #

    I was changing the root domain for a multisite installation (and also getting rid of /blog slug from the root URLs with WP No Category Base - WPML compatible plugin) and the root site admin is broken.

    For example, when I go to one of the posts, click -> Edit and press -> Update (without making any changes, but that doesnt matter), it would save all the changes, but it doesnt load anything in the window. So I need to enter http://domain-name.com/wp-admin by hand, to get it show on the screen again etc (I keep repeating this step a lot of times in order to be able to update the blog)

    The URLS are (for example):

    http://domain-name.com/wp-admin/post.php?post=171&action=edit

    and it goes to:

    http://domain-name.com/wp-admin/post.php (and there is nothing in the browser window)

    I get the same situation with other options, like:

    Categories -> Edit -> Update

    http://domain-name.com/wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=19&post_type=post

    http://domain-name.com/wp-admin/edit-tags.php

    Settings -> General -> Save

    http://domain-name.com/wp-admin/options-general.php
    http://domain-name.com/wp-admin/options.php

    etc... It always saves and appllies whatever changes I make, but it does not load anything in the window.

  2. jtt89
    Member
    Posted 2 years ago #

    EDIT: I also changed an upload path to images, as they were not showing on the website, according to the following:

    1.Go to Super Admin > Sites, hover over the primary blog and click Edit
    2.Change "Upload Path" to wp-content/blogs.dir/1/files (this one was: wp-content/uploads)
    3.Change "Upload Url Path" to /files (this one was empty)
    4.Change "Fileupload Url" to http://domain.com/files (this one was: http://domain-name.com/wp-content/uploads)

    I think it is one of the three things that is causing the problem...

  3. *sigh* Don't do that. Really, don't screw around with the uploads, they have nothing to do with your admin working (or not working), they have to do with your media, where it's stored, and what URL it's access by. It's supposed to be wp-content/uploads for your main site.

    Don't assume you know better than WordPress's default install, unless you're a core developer. And even then, you're probably wrong :) I've had to rebuild enough sites to know that I don't know better, and I've been at this for a long time now.

    The issues are all down to two likely things:

    1) Plugins
    2) Themes

    Since none of these things happen on clean installs, you've basically managed to muck up your site. The best thing you can do is start the normal, standard debugging.

    Turn off all of your plugins. Yes. All. And switch to the TwentyEleven theme.

    Does the issue with saving posts still happen?

  4. jtt89
    Member
    Posted 2 years ago #

    I changed the upload settings because of images not showing on the root site, and that helped. I was also told to check whether AllowOverride is set to All in httpd.conf file (the answer from host was yes), but I just left it at this, since it was working. But it looks like I took a wrong path...

    I have several things going on with the root site that I need / want to fix:

    1) Pagination not working (I get a 404 error on http://domain-name.com/page/2
    2) Root site admin is broken (it saves the information, but it does not go back to the screen, like I mentioned before)
    3) Yoast SEO sitemap is not working (I actually get the same "nothing" screen from point 2, when I enter http://domain-name.com/sitemap_index.xml <thats the URL for the sitemap on the other, not root, blogs>; when I enter something like http://domain-name.com/some-word/sitemap_index.xml I get a 404 error - so it looks like something is there, but it is not showing)

    I will be deactivating all the plugins, and testing it on TwentyEleven, according to the post above.

    Thank you.

  5. jtt89
    Member
    Posted 2 years ago #

    I am gonna try to do this one thing at a time, so to come back to the "square one" - images are not showing on the root website after adding them to a post.

    I changed the settings to the origninals, which is:

    Upload Path: wp-content/uploads
    Upload Url Path: <empty>
    File Upload Url: http://domain-name.com/wp-content/uploads

    #) AllowOverride is set to All in httpd.conf

    #) When I right-click "Properites" on the empty image spot I get the following URL:
    http://domain-name.com/p-content/uploads/2012/06/file-name.jpg

    #) This is htaccess file:

    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).*) $1 [L]
    
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    
    RewriteRule . index.php [L]
    # BEGIN W3TC Browser Cache
    <IfModule mod_deflate.c>
        <IfModule mod_setenvif.c>
            BrowserMatch ^Mozilla/4 gzip-only-text/html
            BrowserMatch ^Mozilla/4\.0[678] no-gzip
            BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
            BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
        </IfModule>
        <IfModule mod_headers.c>
            Header append Vary User-Agent env=!dont-vary
        </IfModule>
        <IfModule mod_filter.c>
            AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
        </IfModule>
    </IfModule>
    <FilesMatch "\.(css|js|htc|CSS|JS|HTC)$">
        FileETag None
        <IfModule mod_headers.c>
             Header set X-Powered-By "W3 Total Cache/0.9.2.4"
        </IfModule>
    </FilesMatch>
    <FilesMatch "\.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|SVGZ|TXT|XSD|XSL|XML)$">
        FileETag None
        <IfModule mod_headers.c>
             Header set X-Powered-By "W3 Total Cache/0.9.2.4"
        </IfModule>
    </FilesMatch>
    <FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|WAV|WMA|WRI|XLA|XLS|XLSX|XLT|XLW|ZIP)$">
        FileETag None
        <IfModule mod_headers.c>
             Header set X-Powered-By "W3 Total Cache/0.9.2.4"
        </IfModule>
    </FilesMatch>
    # END W3TC Browser Cache
    # BEGIN W3TC Page Cache core
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
        RewriteRule ^(.*\/)?w3tc_rewrite_test$ $1?w3tc_rewrite_test=1 [L]
        RewriteCond %{HTTP_HOST} ^(www\.)?([a-z0-9\-\.]+\.[a-z]+)\.?(:[0-9]+)?$
        RewriteRule .* - [E=W3TC_DOMAIN:%2]
        RewriteCond %{REQUEST_URI} ^/(001|002)/
        RewriteRule .* - [E=W3TC_BLOGNAME:%1.]
        RewriteCond %{HTTPS} =on
        RewriteRule .* - [E=W3TC_SSL:_ssl]
        RewriteCond %{SERVER_PORT} =443
        RewriteRule .* - [E=W3TC_SSL:_ssl]
        RewriteCond %{HTTP:Accept-Encoding} gzip
        RewriteRule .* - [E=W3TC_ENC:_gzip]
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} =""
        RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register|mail)\.php|wp-.*\.php|index\.php) [NC,OR]
        RewriteCond %{REQUEST_URI} (wp-comments-popup\.php|wp-links-opml\.php|wp-locations\.php) [NC]
        RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_\[a-f0-9\]\+|wordpress_logged_in) [NC]
        RewriteCond %{HTTP_USER_AGENT} !(W3\ Total\ Cache/0\.9\.2\.4) [NC]
        RewriteCond "%{DOCUMENT_ROOT}/wp-content/w3tc-%{ENV:W3TC_BLOGNAME}%{ENV:W3TC_DOMAIN}/pgcache/%{REQUEST_URI}/_index%{ENV:W3TC_UA}%{ENV:W3TC_REF}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}" -f
        RewriteRule .* "/wp-content/w3tc-%{ENV:W3TC_BLOGNAME}%{ENV:W3TC_DOMAIN}/pgcache/%{REQUEST_URI}/_index%{ENV:W3TC_UA}%{ENV:W3TC_REF}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}" [L]
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} =""
        RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register|mail)\.php|wp-.*\.php|index\.php) [NC,OR]
        RewriteCond %{REQUEST_URI} (wp-comments-popup\.php|wp-links-opml\.php|wp-locations\.php) [NC]
        RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_\[a-f0-9\]\+|wordpress_logged_in) [NC]
        RewriteCond %{HTTP_USER_AGENT} !(W3\ Total\ Cache/0\.9\.2\.4) [NC]
        RewriteCond "%{DOCUMENT_ROOT}/wp-content/w3tc-%{ENV:W3TC_BLOGNAME}%{ENV:W3TC_DOMAIN}/pgcache/%{REQUEST_URI}/_index%{ENV:W3TC_UA}%{ENV:W3TC_REF}%{ENV:W3TC_SSL}.xml%{ENV:W3TC_ENC}" -f
        RewriteRule .* "/wp-content/w3tc-%{ENV:W3TC_BLOGNAME}%{ENV:W3TC_DOMAIN}/pgcache/%{REQUEST_URI}/_index%{ENV:W3TC_UA}%{ENV:W3TC_REF}%{ENV:W3TC_SSL}.xml%{ENV:W3TC_ENC}" [L]
    </IfModule>
    # END W3TC Page Cache core

    EDIT:
    #) Broken root site admin issue dissapears after changing to TwentyEleven, but at the same time I dont have no issues on any of the other (non root sites) that are using exactly the same theme (I use the same theme, but name it differently, so I am able to edit them separately without a need of using a plugin <I just modify a name on the top of main ccs file>, but the point is that it is not all going from one theme folder, but each site has a separate one)

    #) Sitemap is showin also, after switching to TwentyEleven (again, all other sites use that theme, and there is no issue)

    The other thing is that I think that this theme was working correctly to begin with, and all the issues started after making some Settings changes etc...

  6. jtt89
    Member
    Posted 2 years ago #

    #) I changed the image link to wp-content/uploads and it is still not showing... (I cant edit the previous post)

    #) After entering the image URL into browser address bar I get the following:

    403 Forbidden
    Access to this resource on the server is denied!

    (http://domain-name.com/wp-content/uploads/2012/06/file-name.jpg)

    On other sites when I copy the link and go to the URL I get an image in the browser, so it might be some permissions issue somewhere...

    (wp-content/uploads and wp-content/blogs.dir are both set to 751; all the permissions are exactly the same 751 for folders, and 640 for the actual image files in both cases)

    For a non-root site it is for example:

    http://domain-name.com/files/2012/06/file-name.jpg

    (and this one would show)

    # # #

    The only thing that I did to the site was changing the root domain name with:

    http://sewmyheadon.com/2009/mysql-search-replace-tool/

    Then I was experimenting with the following settings, and I think I changed them all back to defaults (I listed the contents of the fields also):

    Permalink Structure: %postname%
    Category Base: <empty>
    Upload Path: wp-content/uploads
    Upload Url Path: <empty>
    Fileupload Url: http://domain-name.com/wp-content/uploads

    Other than that the site should be in the original state...

  7. Wow. Your .htaccess is seriously screwed up.

    Since we're supposed to be testing without any plugins, revwert your .htaccess to one of these: http://codex.wordpress.org/Multisite_Network_Administration#.htaccess_and_Mod_Rewrite

    Also keep in mind: WordPress' rewrite rules always go on the bottom. So you should have a layout like this:

    #Begin W3TC
    All that stuff
    # End W3TC 
    
    # Begin WordPress
    All WP's stuff
    # End WordPress
  8. jtt89
    Member
    Posted 2 years ago #

    I changed the .htaccess file to SubFolder example (my installation is subfolder), and I am in the same spot:

    1) Images don't show on the website
    2) Admin is broken (it goes to these "nothing" pages; it doesnt apply to all the admin links - some of them work, some of them dont)
    3) Sitemap is not shoiwng (it goes to that "nothing" page also)

    I am not sure what is causing the images issue (although I mentioned something about permissions, like WordPress would be putting them there, but couldnt read them), and points 2 and 3 seem to be theme related (issues disappear after switching to TwentyEleven). The thing is that I need to keep the theme that I am using, as all the websites that I am working on look the same (again, I think that everything was working fine to begin with)

    This is the theme that I am using:

    http://wordpress.org/extend/themes/ultralight

    I made some modifications, but mostly CSS, and I did not change anything that would cause the site not to work correctly (I was only making changes in Network Admin -> Sites -> (root site) Edit -> Settings, and I think that right now everything is set to defaults)

  9. It's likely your theme.

    Last Updated: 2009-04-03

    That's three years, and there have been a lot of changes in WP (including Multisite).

  10. jtt89
    Member
    Posted 2 years ago #

    I changed the theme for a new one and it solved all the issues except for the broken images.

    When I start a new post and click Upload/Insert -> Select Files , I am not showing the image preview (above <Edit Image> button), but I am able to view it after clicking "Edit Image". When I insert it into post and publish it the image is not showing on the website.

    For the image URL I get the following path:

    http://domain-name.com/wp-content/uploads/2012/06/image-name.jpg

    ...and I am not able to access it directly through this URL in the browser. I get the following error:

    403 Forbidden, Access to this resource on the server is denied!

    When I go to a different site on the installation (non root), I am easily able to access the image through a URL that is given, for example:

    http://domain2-name.com/files/2012/06/file2-name.jpg

    (I would be talking about Media -> Library -> (Edit) -> File URL)

    I think that all the settings are set to default also (Network Admin -> Sites -> (root site) Edit -> Settings).

  11. Double check that the /wp-content/uploads/2012/06/ stuff actually exists.

    I suspect that it's all the monkeying around with the uploads that got that one borked :/

  12. jtt89
    Member
    Posted 2 years ago #

    Files are uploaded in the folder. I started changing the settings because the images were not uploading, so it was not working in the first place. I have a feeling I might neet to tall to my hosting about this one...

  13. FWIW, the wp-content/uploads folders don't go through the ms-files redirect. That is, your images in http://domain2-name.com/files/2012/06/file2-name.jpg are going from that to the ms-files.php page (see the line in the .htaccess? That's it :) ) and then to http://domain2-name.com/wp-content/blogs.dir/#/files/2012/06/file2-name.jpg

    A link to http://domain-name.com/wp-content/uploads/2012/06/image-name.jpg is a totally direct link, no extra hoops and ladders.

    You don't have any hotlink protection going on, do you?

  14. jtt89
    Member
    Posted 2 years ago #

    I checked and Hotlink Protection is Disabled (thats in cPanel if somebody else is looking)

  15. There are other ways to do it (I do it straight up in .htaccess for example), but you'd know if you did 'em ;)

    Yeah, time to ask the host why the 403 on images in that folder.

    Maybe they're owned by the wrong account?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.