Bug 455801 - cannot get to single-post-entries for main blogs.corp.redhat.com blog
cannot get to single-post-entries for main blogs.corp.redhat.com blog
Product: Red Hat Collaboration Applications
Classification: Retired
Component: Wordpress (Show other bugs)
All Linux
high Severity high
: ---
: ---
Assigned To: Monty Hood
Sudhir Mallamprabhakara
: 457580 (view as bug list)
Depends On:
Blocks: BackLog
  Show dependency treegraph
Reported: 2008-07-17 17:01 EDT by Bret McMillan
Modified: 2010-06-23 15:31 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-06-23 15:31:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
proposed redirect config change (1.09 KB, patch)
2008-09-02 14:32 EDT, Bret McMillan
no flags Details | Diff

  None (edit)
Description Bret McMillan 2008-07-17 17:01:22 EDT
Description of problem:

Going directly to a particular  blog entry for the main blogs.corp.redhat.com
blog (see $URL) causes a redirect to happen, which results in the user being
taken to the login page, or to the wp-admin/ area.

This shouldn't happen, the user should be taken to the specific post.

Steps to Reproduce:
1. Go to $URL
Actual results:
Login or admin page shown 

Expected results:
The specified post should be displayed

Additional info:
Most likely this is a missing rewrite rule.
Comment 1 Bret McMillan 2008-07-18 09:40:22 EDT
Ok, not a missing rewrite rule.  Looks more like a core wpmu flaw when
Comment 2 Bret McMillan 2008-07-18 10:01:53 EDT
Started a thread in the wpmu forums:

Comment 3 Bret McMillan 2008-07-21 14:17:09 EDT
Looks like the issue is with how the original everest datasource snapshot took
place.  there should be a "blog/" url prefix for the main blog when not using
Comment 4 Bret McMillan 2008-08-22 12:34:31 EDT
Upping severity and priority, likely a db-level issue as a result of the initial installation.
Comment 5 Bret McMillan 2008-09-02 12:29:34 EDT
*** Bug 457580 has been marked as a duplicate of this bug. ***
Comment 6 Bret McMillan 2008-09-02 14:31:16 EDT
Ok, so this does appear to be an issue w/ the original config of the system. 
Need to run a sql update of the system to fix the issue, and implement a
redirect ...

SQL change:
UPDATE wp_blogs SET path = '/internalblogs/' WHERE blog_id = 1;


commit 7fc3e9d850d87e6aaa40ea8bfdc21138bedcfc3a
Author: Bret McMillan <bretm@redhat.com>
Date:   Tue Sep 2 14:30:11 2008 -0400

    bz 455801:  main blog needs to be on same level as other blogs

diff --git a/templates/wordpress-mu-proxy.conf.erb
index 016f3fa..1714e9e 100644
--- a/templates/wordpress-mu-proxy.conf.erb
+++ b/templates/wordpress-mu-proxy.conf.erb
@@ -60,6 +60,8 @@ NameVirtualHost <%= ipaddress %>:443
   ServerName <%= wpmu_visible_hostname %>
   DocumentRoot /usr/share/wordpress-mu

+  RewriteRule ^/$ https://<%= wpmu_visible_hostname %>/internalblogs/
   # security; force https on certain urls
   RewriteRule ^/(.*?)wp-(admin/|login|register)(.*) https://<%=
wpmu_visible_hostname %>/$1wp-$2$3 [L]
@@ -68,6 +70,8 @@ NameVirtualHost <%= ipaddress %>:443
 <VirtualHost <%= wpmu_visible_hostname %>:443>
   RewriteEngine on

+  RewriteRule ^/$ https://<%= wpmu_visible_hostname %>/internalblogs/
   SSLEngine on
   ServerName propaganda-wpmu-bretm-virt2.usersys.redhat.com
   DocumentRoot /usr/share/wordpress-mu
Comment 7 Bret McMillan 2008-09-02 14:32:31 EDT
Created attachment 315576 [details]
proposed redirect config change

Attaching the patch since git diff's don't appear well as a comment...
Comment 8 David Lawrence 2008-10-06 12:35:08 EDT
Moving to product "Red Hat Collaboration Applications".
Comment 9 Anne Cressman 2008-11-18 12:08:27 EST
See User Story #50326.
Comment 10 Bret McMillan 2009-04-06 11:28:09 EDT
Looks like this was the wrong fix; instead of moving the blog down to be a peer, should have probably fixed its permalink structure.  See:


Anyway, here's what needs to be applied to the db to revert the /internalblogs/ change:

UPDATE wp_blogs SET path = '/' WHERE blog_id = 1;

UPDATE wp_1_options SET option_value = 'http://blogs.collab.webdev.redhat.com/' WHERE option_name in ('siteurl', 'home') and option_value like '%blogs.collab.webdev%';

update wp_1_options set option_value = '/blog/%year%/%monthnum%/%day%/%postname%/' where option_name = 'permalink_structure';

Then need to alter the RedirectMatch to point /internalblogs/ stuff back to the root.  Silly me :(
Comment 12 Bret McMillan 2010-06-23 15:31:17 EDT
Closing legacy junk.

Note You need to log in before you can comment on or make changes to this bug.