Copyright module turns 404's to 403's

txcrew - May 1, 2007 - 22:56
Project:Copyright
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:toemaz
Status:closed
Description

I've been having the problem where anytime a user was supposed to get a 404 error they would receive a 403 Access Denied message from Drupal. I was recently able to track it down to the Copyright.module.

I'm not sure what the cause is but I'm going to have to disable it until it is fixed.

Running D5.1 on with mysql and clean URL's enabled.

Thanks and keep up the work on this fine module.

txcrew

#1

mdlueck - July 10, 2007 - 20:15

We can confirm this bug also with Drupal 5.1. Removing the module resolved our issue as well.

#2

toemaz - July 11, 2007 - 12:26

It looked obvious to look into the menu hook for the solution.

AttachmentSize
copyright_invalid_path.patch 1.15 KB

#3

toemaz - July 11, 2007 - 12:35
Version:5.x-1.0» 5.x-1.x-dev

It actually applies to the latest branch. If you commit the latest patch, beware it might need some more testing. I just saw it took away the 403-404 issue.

#4

toemaz - July 11, 2007 - 12:54
Status:active» reviewed & tested by the community

Oh, and I forgot to mention this: make sure you reset the menu! I use the devel module for this, but I guess it does it automatically when you browse to /admin/build/menu.

#5

toemaz - July 12, 2007 - 08:57

I have been thinking how the menu should be resetted. Browsing to admin/build/menu does not rebuild the menu structure (as it did with D4.x). For the moment, I only see one possiblity: write an update script for copyright.install which removes the invalid menu records from the menu table.

One question dhough: are these menu items used anyway? Otherwise, I would propose to remove that piece of code.

#6

Robrecht Jacques - July 12, 2007 - 10:42

You can add a menu_rebuild() in an copyright_update_X() iirc. But I think that if you install a new version of the module (and running update.php), that is done anyway.

I was a bit puzzled about those menu entries too when I took over maintanance of the module. If we can remove them (eg not used), then I have no problem doing so.

I'll check it more carefully this evening.

#7

toemaz - July 12, 2007 - 10:58

I would propose to remove this menu snippet. I don't find how this is begin used. According to me, this is an artifact from old drupal versions (<4.7) and obsolete right now.

#8

toemaz - August 9, 2007 - 09:45
Assigned to:Anonymous» toemaz

Ok, lets get some movement in this very unpleasant bug. I made a new patch based on the previous discussion on whether the piece of code that causes the troubles in the menu hook should remain in there. So, this new patch

  1. removes the bad part from the menu hook
  2. adds a new update function to the install file

Please test this if you can, and let us know whether it works. It deserves some attention since this is a major bug and driving people away from this nice module.

AttachmentSize
copyright_menu.patch 1.61 KB

#9

toemaz - September 6, 2007 - 09:14

@Robrecht

I consider this issue as critical because anyone who will download the official release will encounter this issue. Is it possible to give this issue some love? The issue and patch are already to long in the pipeline.

#10

manuj_78 - September 27, 2007 - 10:07

any idea when this will get committed?

#11

Robrecht Jacques - October 5, 2007 - 15:48
Status:reviewed & tested by the community» fixed

Fixed in 5.x-1.6. Thanks!

#12

Anonymous - October 19, 2007 - 15:51
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.