afer mass sorting images in the gallery, all images has new 'node published' date. I think only 'node updated' date should be changed.

Now it messes my "latest image" view completely and I have to change publishing date manually! :)

CommentFileSizeAuthor
#6 748054.patch648 bytesjustintime
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Daugilas’s picture

By the way, it also changes author of the picture. So if I upload images with 'regular user' and gallery is sorted by 'moderator', after sorting all images are submited by 'moderator'!

justintime’s picture

Assigned: Unassigned » justintime

I'll take a look at this one.

dddave’s picture

justintime’s picture

Status: Active » Needs review

I think there's a good chance that the patch posted in #550994: Admin editing gallery changes user ID will also fix this bug. I'm going to mark it as needs review so someone can test it out.

dddave’s picture

Status: Needs review » Needs work

Sorry, but the date changes when I sort the images. Not for all images in a gallery but for all those shuffled around.

justintime’s picture

Status: Needs work » Needs review
FileSize
648 bytes

O.M.G.

That has to be the most time I've spent on one line of code *ever*. Very deep within the bowels of node.module, I found the problem. The fix is simple, we just need to call node_object_prepare() on the node before saving it.

The attached patch should fix the problem.

dddave’s picture

Version: 6.x-2.0-alpha12 » 6.x-2.x-dev
Status: Needs review » Reviewed & tested by the community

Fix confirmed.

I really admire people with the ability to read code AND understand it. Btw is a new dev on its way? Would like to have the "My Galleries" fix back without patching again. Lost it when I used a clean NG to test some other patches... ;)

justintime’s picture

Status: Reviewed & tested by the community » Fixed

Committed. I'll do a mass-merge of the code changes I've been making in HEAD back to the 2.x branch in just a bit.

Status: Fixed » Closed (fixed)

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