Subdomain shows wrong page when OGUR is enabled.

held69 - April 20, 2009 - 22:41
Project:OG User Roles
Version:6.x-1.5
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Sorry for posting again but after some hours of trying, i still am getting some odd behaviour.

Subdomain settings:
Creat domains for OG and group content.
Using the name of OG

Pathauto settings:

Node path settings for groupnodes: content/[title-raw] for default for blank patterns
[subdomain]/content for groupnodes and groupcontent

After creation of group node i get a page not found. url:subdomain/mysite.com or subdomain/mysite.com/content

I've tried different combinations in the node path pathauto settings such as:
[subdomain]
[subdomain]content/[title-raw]

But got directed to a page not found or a totally different page.

My prerequisites are all marked green see attachment.
I have placed tilde to 'no action'.

Suggestions appreciated

Thanks

AttachmentSize
prerequisites marked green.JPG48.1 KB

#1

held69 - April 25, 2009 - 19:50

But got directed to a page not found or a totally different page.

I have now noticed that when i place just [subdomain] under node path settings in path auto, i will not get a 404, (placing [subdomain]/content/[title-raw] resulted in 404's )
Instead of that i get directed to the frontpage of my site. The subdomain in the url is well created.

For example:
1.I create groupnode with title:'test'
2.drupal confirms that the node is created.
3.Instead of displaying the created groupnode 'test', the default frontpage is displayed.
4.The url of this page is the url that should have been given to the created groupnode namely
test/mysite.com

#2

setvik - May 14, 2009 - 05:48
Status:active» postponed (maintainer needs more info)

If you want your Group URLs to look like this:

mygroup.mysite.com
myothergroup.mysite.com

You'll want to set the pathauto node settings path for your Group node-type to [subdomain]

is that what you've done?

Also, if you created the groups before setting the tilde to "no action", you need to edit and re-save those groups so the correct url can be generated.

#3

held69 - May 14, 2009 - 07:46

Thanks for reacting

You'll want to set the pathauto node settings path for your Group node-type to [subdomain]

is that what you've done?

Yes, in the pathauto node settings for my group node-type i have placed [subdomain]

I created my groupnodes after setting tilde to "no action" to get the right url.

Actually the right url is being created for example: newnode.mysite.com
But right after node creation i get directed to the frontpage of my site while seeing newnode.mysite.com
in the browsers adress field.

When i want to open (not edit) the node under administer/content the same thing happens, i get directed to the frontpage of my site while seeing newnode.mysite.com in my adress field

Despite the fact that my prerequisites are all green, could the cause of this problem be at my host?

#4

setvik - May 16, 2009 - 14:42

hmm... if all the prerequisite lights are green, i'm not sure the problem could be...

Are you on shared hosting?

Do you have a default Drupal .htaccess file or have you made any changes to it (esp. rewrite rules)?

Are you running other modules on your site that could conflict with the subdomain module (i.e. global redirect or domain access)

To debug:

I'd look at the url_alias table & look for the node of the group you created.
the path alias should be "~[group name]"

Try entering that in the url bar of your browser and see if you get taken to the group homepage:

e.g. "http://example.com/~[group name]" should take you to [group name]'s front page on your site.

If that works, then I'd start debugging the $_SERVER & $_GET variables in php to see what's going on...

#5

held69 - May 16, 2009 - 22:27

- Yes i am on shared hosting.

Here a copy of my ht access file.

#
# Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
  Order allow,deny
</FilesMatch>

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php

# Force simple error message for requests for non-existent favicon.ico.
<Files favicon.ico>
  # There is no end quote below, for compatibility with Apache 1.3.
  ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>

# Set the default handler.
DirectoryIndex index.php

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

# PHP 4, Apache 1.
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
  php_value memory_limit 64M
</IfModule>

# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On

  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600

  # Do not cache dynamically generated pages.
  ExpiresByType text/html A1
</IfModule>

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (http://example.com/... will be redirected to http://www.example.com/...)
  # adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
  #
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/... will be redirected to http://example.com/...)
  # uncomment and adapt the following:
  # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  # RewriteBase /drupal
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  # RewriteBase /

  # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

# $Id: .htaccess,v 1.90.2.2 2008/11/28 09:39:33 dries Exp $

- No I dont have either of the two modules installed.

Modules installed:
-OG
-OG user roles
-date
-calendar
-cck
-views
-notifications
-message

In the url alias list i looked up the groupnode i created.

The path alias is ~[groupname]
pasting http://mysite.coml/~groupname in my url bar brings me indeed to the group homepage.

However clicking on this node itself under administer/content gives me the following url:
http://groupname.mysite.com/
The page i now see is the default frontpage of my site, set under 'siteconfiguration-site information'.

To test i have changed the url (under 'siteconfiguration-site information') with url's of different pages in my site.
When i click on my new groupnode it will lead to the page stated under siteconfiguration-siteinformation.

"If that works, then I'd start debugging the $_SERVER & $_GET variables in php to see what's going on..."

Mmmmmm, i hardly have any php knowledge .

Thanks sofar

#6

held69 - June 3, 2009 - 10:34
Project:Subdomain» OG User Roles
Version:6.x-1.5» 6.x-1.5
Category:support request» bug report

Ok i did some solid testing and discovered the following.

On a fresh drupal 6.12 install subdomain just works fine

Modules:
OG
Vieuws
Subdomain
pathauto
Token

As soon as i enable OG user role the problem occures as mentioned under #3 and #5.

Taking this to OG user roles.

#7

held69 - June 3, 2009 - 10:49
Title:Searching for right pathauto settings after install, getting page not found» Subdomain shows wrong page when OGUR is enabled.

I have been trying to test again but got confused because of different results.

Again on a fresh drupal install i have the following modules:
OG
OGUR
Subdomain
Pathauto
Token

If i install all modules accept OGUR everything seems right.
Note: for installing the subdomain i had to apply some adjustments to my settings.php file.

Once i enable OGUR i get a fatal error:
Fatal error: Call to undefined function subdomain_url_rewrite_inbound() in /home/mysite/domains/mysite.com/public_html/sites/default/settings.php on line 241

Once i get rid of the code i had to add in my settings.php file i have access to my site again.

#8

held69 - June 3, 2009 - 10:52

I was able to solve this one by applying a (function_exists)

http://drupal.org/node/326499#comment-1659096

However problem as mentioned under #6 still occurs....

#9

SomebodySysop - June 3, 2009 - 15:55

OGUR is not re-directing your group home page. It only re-directs on /node/add in group context.

However, from your explanation, it would appear that OGUR could be doing something which causes the re-direction.

I, however, can not think of any reason why OGUR itself would prevent Subdomain from doing it's thing.

So, I would suggest posting the relevant output from the debug table (og_user_test) and let's see what's showing up there.

#10

held69 - June 3, 2009 - 20:01

Thanks for posting.

As far as i understand i need to use the Database Administration module.
http://www.drupal.org/project/dba

However i can't find a version which runs on drupal 6.

Are there alternatives?

#11

SomebodySysop - June 4, 2009 - 02:02

Install phpmyadmin: http://www.phpmyadmin.net/home_page/index.php

Then point it to your Drupal database. You can then use sql to display the contents of any Drupal table in your site.

#12

SomebodySysop - June 4, 2009 - 02:06

Also, I have another test which might more quickly determine the culprit here.

Uninstall Subdomain module. Leave OGUR installed.

Then, see if the pathalias works:

http://mysite.coml/~groupname

Then, uninstall OGUR, and see if it works.

#13

held69 - June 4, 2009 - 22:48

In my host package Phpmyadmin is by default included together with my database.
However i´m not quit familiar with it.
Which table and its content do you need?
There is a table called og_user_test. see screenshot.
There is a tab called 'Export'. Do you want me to export this table,
as i dont know how to show content of a table using SQL.

As for the second alternative.....

With Subdomain uninstalled and OGUR installed:
Alias is http://mysite.com/content/groupname

With OGUR uninstalled and Subdomain installed:
the alias is http://mysite.com/~groupname

With OGUR installed and Subdomain installed:
the alias is http://mysite.com/~groupname

Thanks

Byron

AttachmentSize
og_user_test.JPG 95.3 KB

#14

SomebodySysop - June 5, 2009 - 00:34

Yes, you should export the table so we can see the entire reults. The screenshot doesn't show much.

You say you are re-directed when you try to edit the page: http://mysite.com/~groupname

What is the url to edit this page?

It may be that ogur won't work with subdomain because this is the first time I've ever seen a url like this: http://mysite.com/~groupname

Is this tilde character a requirement of subdomain?

#15

held69 - June 5, 2009 - 22:04

To set up a clear example for you, i created 4 nodes with the following node titles.

1. OGUR and Subdomain installed (see screenshot)

2. Subdomain without OGUR (see screenshot)

3. OGUR without Subdomain

4. This another page node (just to show another node on the homepage see screenshot)

Each title suggests the situation whether if OGUR and/or Subdomain is installed.
On each screenshot you can see the url in combination with the created node.
On screenshot 'OGUR and Subdomain' you can see the URL of the created node in
combination with the redirected homepage.
The screenshot 'aliases' shows you the aliases of these nodes.

"What is the url to edit this page?"
Note that i only get redirected when i click the title of the node.
When i want to edit the node i just go to the node. URL:
http://mysite.com/node/16/edit?destination=admin%2Fcontent%2Fnode

"Is this tilde character a requirement of subdomain?"
I think the tilde is a result of a for Subdomain required setting in pathauto, under 'punctuation settings'.
Tilde ~ should be set to No action (do not replace)

AttachmentSize
1.OGUR and Subdomain installed.JPG 56.46 KB
2.Subdomain without OGUR.JPG 59.46 KB
homepage.JPG 55.2 KB

#16

held69 - June 5, 2009 - 22:08

Attached are og_user_test database export file.
Screenshot 'aliases'

Thanks

Byron

AttachmentSize
og_user_test.zip 2.75 KB
aliases.JPG 59.52 KB

#17

SomebodySysop - June 8, 2009 - 00:48

Can you use Subdomain module without the "~"?

#18

held69 - June 8, 2009 - 09:32

The subdomain module will not work properly without the "~".

It will generate the url mysite.com/groupname when i set it to 'replace by seperator' or 'remove'.

Whereas i set it to the required setting, that is 'no action do not replace', the module works properly and generates the url groupname/mysite.com

From Subdomain readme file:

STEP 6: Configure Pathauto (URL aliases -> Automated alias settings):
1) Go to "Punctuation Settings" and set "Tilde ~:" to "No action"
2) Place [subdomain] at the *start* of all paths whose content you
want placed on a subdomain

#19

Badger - September 24, 2009 - 11:00

what happened here?
I seem to have the same problem - I can't reach any other subdomain but the one I'm a member of (Subdomains = OGs)
Weell, that wasn't the issue, I just can't get anywhere from the startpage.

#20

held69 - September 24, 2009 - 14:14

The last news i heard from the maintainer is, that he is working on it.

The issue you described is indeed the same as i have experienced.

I'm still hoping for a solution.....

#21

Badger - October 6, 2009 - 11:10

There is a way to get OGUR to work together with suibdomains. Set the weight of the subdomain module to -200, to make it run before OGUR. do a SQL query like:

UPDATE system set weight=-200 where name="subdomain";

#22

held69 - October 26, 2009 - 19:57
Status:postponed (maintainer needs more info)» fixed

Tested and works!

thanks very much for sharing.

#23

System Message - November 9, 2009 - 20:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.