During the upgrade I got:

Failed: INSERT INTO {url_alias} (src, dst) VALUES ('node/feed', 'rss.xml')

After the update I tried to correct the thing by hand, but it still doesn't work. node/feed works well, rss.xml simply forwards me to the main page. Any ideas?

(I'm trying to upgrade from 4.6.5 to 4.7)

Comments

Uwe Hermann’s picture

Priority: Normal » Critical

If this is really true, it's probably release critical. I was not able to duplicate the bug, upgrading from a fresh 4.6 to CVS HEAD.

Did you create an "rss.xml" alias manually sometime in the past? Do you know whether it was there before the update?

What was the first version you installed? Did you start from 4.6.5? Did you upgrade from older versions?

How did you perform the upgrade from 4.6.5 to 4.7? Did you copy the 4.7 files over the old ones, and then called update.php, or vice versa?

killes@www.drop.org’s picture

Priority: Critical » Normal

If you can't reproduce it, it probably isn't critical. Actually, if you could, it wouldn't be since the error just means that the alias we try to create already exists,

adrinux’s picture

I'm also getting this, as described in my dupe: http://drupal.org/node/60471
I searched the issue queue about five different ways and didn't find this :(

In answer to some of Killes questions:
The url alias exists on the 4.6 site, both node/feed and rss.xml work.
After running current update.php neither seem to be doing anything, both forward to the front page.
I don't remember creating this alias.
IIRC the site started in 4.5 and was upgraded to 4.6, all of the 4.6 security updates, and then from 4.6.6 to cvs today.
The upgrade was performed like this:
Database dump to sql on the remote server, database load into database on local server - the 4.6 site is still live while I work on the 4.7 version - update.php run (after setting $access_check = FALSE;) without ever visiting the site locally.

The local cvs head install of Drupal was fresh, but has been updated several times (cvs export > svk import > svk co| svk smerge).
A diff between the original export and my working copy shows differences only where they should be.

I think there are actually two issues here, one of the update not working where the alias already exists, and one of broken feeds.

adrinux’s picture

Looking at two other 4.6 sites (based on the same multisite as the site I'm upgrading to 4.7) - it seems that those with the syndicate block enabled have the url alias rss.xml. A site without that block enabled didn't - but when I enabled the block it simply links to node/feed, not rss.xml, whereas in the other sites the syndicate block links to rss.xml - confused?

I am.

adrinux’s picture

OK, I'm getting less confused :)
Lets see if I can bring some clarity to this.

I enabled the devel.module to see what was happening - then before actually configuring devel clicked on the feed link and *ping* feeds are now working - even after disabling devel feeds are still working, so we'll put that brokenness down to modules not reloading/updating. The clarify further, the feed is at 'example.com/rss.xml', there is no url_alias defined to 'node/feed' (I'd already deleted it), and node_feed doesn't work.

Now. In 4.6 the main feed was at 'node/feed', and the url_alias pointing rss.xml to 'node/feed' seems to have been created (don't ask me how).

In 4.7 the feed is at rss.xml, and the failed update #138 attempts to create an alias pointing 'node/feed' to rss.xml - the opposite to the situation in 4.6 and needed to support legacy links to the feed at 'node/feed'.

So what happened in my case:
A pre-existing url_alias of rss.xml -> node/feed in 4.6.6
cvs update #138 fails to create url_alias node/feed -> rss.xml

Result
Trying to reach rss.xml redirects to node/feed, which doesn't exist, user is forwarded to
Trying to reach node/feed, which doesn't exist, user is forwarded to

The manual fix
Delete old 4.6 url alias of rss.xml -> node/feed
visiting rss.xml now works

Create new alias of node/feed -> rss.xml
This ought to replicate update #138, but the resulting alias doesn't seem to work.

Conclusions:
I don't have the sql skills to fix update #138, but clearly if the old alias exists it needs to be deleted before the new one is inserted.

The alias update #138 tries to create doesn't seem to work...

There is a wierd problem with the syndicate block - on vanilla 4.7 the feed icon appears to link to rss.xml, but on upgraded sites it links to node/feed - why?

adrinux’s picture

No, I was still a little confused.

Update #138 actually does try to re-create the same url_alias as exists in 4.6, rss.xml -> node/feed.

If you manually create this however, you break access to rss.xml, and the syndicate block links to node/feed.
Delete it and feeds from rss.xml work, and the syndicate block links to rss.xml. (But node/feed doesn't work.)

Does update #138 need to be changed from an INSERT to a DELETE?
What about legacy support for node/feed?

killes@www.drop.org’s picture

Version: 4.7.0-beta5 » 4.7.0

not sure this was a real problem. If it was we should have had lots of issue reports by now.

David Hull’s picture

This problem happened to me too, and the problem it was self-inflicted.

When I upgraded from drupal 4.6.3 to 4.7.0, I got the error Duplicate entry 'rss.xml' for key 2 query: INSERT INTO url_alias (src, dst) VALUES ('node/feed', 'rss.xml') in .../drupal-4.7.0/includes/database.mysql.inc on line 120. Without thinking too much, I went into the database, looked at the contents of the url_alias table (one row), then dropped and recreated the table, and re-ran the insert statement from update 138 to repopulate the table.

What I missed is that this row is replaced in update 157 with the src and dst fields reversed. Undoubtedly, in retrospect, the table was OK after the update script ran, but I went and reversed the values trying to fix it. I suspect that may be what happened here: you need src=rss.xml and dst=node/feed, not the other way around.

magico’s picture

adrinux or David could one of you make a small patch that corrects the update procedure?

Thanks!

magico’s picture

Version: 4.7.0 » 4.7.5
Status: Active » Fixed

No feedback...

Anonymous’s picture

Status: Fixed » Closed (fixed)
juanfe’s picture

Had this same problem (Syndicate block would link to rss.xml, but following the link would not take you to a feed link) under Drupal 5.6. Simple solution: disable Syndicate block in your theme and re-enable it.