I noticed that some redirects were showing up in the database with the uid field set to 0. It appears that the issue crops up when adding a redirect manually via the "Add Redirect" page. I initially noticed the problem on a site running the 7.x-1.x-beta4 version of the module, but I've since tested and confirmed the issue also exists in the 7.x-1.x-dev version.

CommentFileSizeAuthor
#4 redirect-uid.patch436 bytesmfb
#1 store_uid-2051313-1.patch563 bytesmatt v.

Comments

matt v.’s picture

Status: Active » Needs review
StatusFileSize
new563 bytes

I'm attaching a patch that fixes the problem on my test site. There are probably several places where the uid could be inserted into the $redirect object, so I'm open to suggestions if there is a better place to handle it.

hefox’s picture

Patch fixes the issue, but not sure if it's the best way -- probably should store uid in the form in case someone changes it in hook_redirect_prepare

pere orga’s picture

Issue summary: View changes

I've just closed #2135577: uid is always set to 0 when a redirect is created as a duplicate of this one.

mfb’s picture

StatusFileSize
new436 bytes

OK I'm moving the patch over from that issue to address #2 above.

  • Dave Reid committed f4f0b1a on 7.x-1.x
    Issue #2051313 by mfb, Matt V.: Fixed redirect user ID not stored when...
dave reid’s picture

Status: Needs review » Fixed

Committed #4 to 7.x-1.x.

Status: Fixed » Closed (fixed)

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