RSS links corrupted when Drupal is installed in a sub directory

srobert72 - August 11, 2009 - 08:23
Project:Site map
Version:6.x-1.x-dev
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Issue tags:FEED, RSS
Description

Hi all,

Thx for your great module.

My Drupal site is available at something like http://mydomain.com/drupal/
When I look at sitemap page, all RSS & Feed icons links are invalid.
They are something like :
RSS : http://mydomain.com/drupal//drupal/rss.xml
Taxonomy : http://mydomain.com/drupal//drupal/taxonomy/term/16/0/feed
As you can see "/drupal" appears twice.

I would like to precise that the problem is only in sitemap page.
All my site works correctly.
And RSS link in "Syndicate (site map)" block is correct with : http://mydomain.com/drupal/rss.xml

Thx a lot.

#1

frjo - August 11, 2009 - 13:44

Site map are using Drupals l() and url() core functions to build all links so they should always be correct.

Have you set $base_url in settings.php? Did you by mistake end it with a slash?

#2

srobert72 - August 11, 2009 - 15:31

Hi Fredrik,
thx for your reply.

Yes my settings.php is configured with my subdirectory.
$base_url = 'http://mydomain.com/drupal';

But with this settings "$base_url" or not my problem stays the same, it makes no difference.

Regards

#3

frjo - August 17, 2009 - 20:18
Category:bug report» support request

I have tried to reproduce this problem without success. When I place a Drupal site in a subdirectory the link are constructed correctly.

If it was a site map bug I also believe there would have been more bug reports about it.

If you can I would recommend you to set up a fresh test site with a core theme and see if the problem persists.

#4

srobert72 - August 13, 2009 - 09:12

My real server is under Linux.

I've just tried with new server as this :
OS : Windows Wamp 2.0
Drupal : 6.13
default language : english, no other language

1 change in settings.php :
$base_url = 'http://localhost/drupal';

1 module added :
site_map-6.x-1.x-dev (2009-Aug-12)

site_map configuration : default, nothing changed
Menus configuration : only enable "site map" in Navigation menu

Here is my Site Map HTML page :
Site map
Front page
Front page of My Drupal BETA

URL under Front Page text is : http://localhost/drupal/
URL under is RSS icon is : http://localhost/drupal//drupal/rss.xml

Did I miss something ?

#5

srobert72 - August 16, 2009 - 21:25

Must I configure something special with Apache ?
Maybe our difference is here.

Could you please explain me your .htaccess or VirtualDocument configuration ?

Thx for your help.

#6

frjo - August 17, 2009 - 20:24

Drupal core comes with a htaccess file that includes all the necessary rewrite rules needed for clean URL:s. Nothing extra is needed for the site map module.

Have you tried to set a "RewriteBase" in Drupals htaccess file? For the example site i #4 it would be

RewriteBase /drupal

#7

srobert72 - August 18, 2009 - 07:17

Yes I've tried and it has no effect. Same problem.

I don't understand how we can have 2 different results with fresh reinstalled sites.
My test site with only sitemap module doesn't work better.

Anyone can confirm if it works or not ?

#8

haggins - August 20, 2009 - 00:42

I get the same issue when updating from "6.x-1.x-dev (2009-Apr-23)" to "6.x-1.x-dev (2009-Aug-12)" on my local test machine.

6.13
default lamp installation

#9

srobert72 - August 20, 2009 - 04:15
Category:support request» bug report

I've just tested a little change on my debug site i've described #4.
Same server only one change :
site_map-6.x-1.x-dev (2009-Aug-12)
site_map-6.x-1.0

=> and now it works correctly

That confirms configuration isn't concerned and it must a bug.

#10

frjo - August 20, 2009 - 07:20

I just did a cvs diff -r DRUPAL-6--1-0 I had a look at the changes but can not find anything that can explain this, the links have always been build with l() or url() and that should ensure correct links always.

Can you pack you test site with a databasdump as a tar-ball and send me a link to it?

#11

srobert72 - August 20, 2009 - 07:29

OK Fredrik I'll send you in a moment.
Can you reproduce it on your side with same versions ?

#12

srobert72 - August 20, 2009 - 08:06

Here are my files.
My Drupal zip is to large (1.3Mo) but I made a diff before and after update.
The only difference is site_map module directory.
So I only send my settings.php file.

During my diff I think I found something that could explain.
But maybe i'm wrong.

In site_map.module line 85 :
NOK
$feedurl = variable_get('site_map_rss_front', 'rss.xml');

OK
$feedurl = 'rss.xml';

AttachmentSize
drupal_OK.sql_.zip 29.97 KB
drupal_NOK.sql_.zip 29.98 KB
settings.zip 3.52 KB

#13

frjo - August 20, 2009 - 11:37

I can not reproduce this problem and to be able to look inte to it I need your complete installation.

Tar-ball it and just send me a link so I can download it, no need to upload it in public here on d.o.

#14

srobert72 - August 20, 2009 - 12:27

Here it is
http://www.yousendit.com/download/YkxKTXRhbEpFd2RFQlE9PQ

For OK and NOK site you could find site and database backup.

#15

frjo - August 21, 2009 - 07:02
Title:RSS&Feed links invalid» RSS links corrupted when Drupal is installed in a sub directory
Status:active» fixed

Credit to you for hanging in there! I have now found the bug, sorry it took some time.

Sitemap was running RSS links through url() and then through l(). I had rebuilt the theme_site_map_feed_icon() function to use l() and missed to remove the url() part when calling it.

Have committed a fix to 6-dev now.

Thanks for helping fix this bug!

#16

srobert72 - August 21, 2009 - 08:00

Thx a lot Fredrik !

I'm impatient to test next release.
I'm waiting for it to be generated.

Don't worry for delay. There is absolutly no reason.
Thx for your good job and for your patience.
Others could have simply reply "unreproductible" and close issue.

Thx again,
Regards

#17

srobert72 - August 21, 2009 - 14:12

Confirmed : fixed in 6.x-1.x-dev (2009-Aug-21)

Thx again Fredrik.

#18

System Message - September 4, 2009 - 14:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.