Comments

tahiche’s picture

Thanks math0ne !!

chrislabeard’s picture

I tried to run this patch and got this error.

patching file publication_date.module
patch unexpectedly ends in middle of line
patch: **** malformed patch at line 47:  
cesareaugusto’s picture

Would it be possible to port this pacth to the D7 version? :)

dgtlmoon’s picture

StatusFileSize
new2.02 KB

better formed patch attached

markie’s picture

StatusFileSize
new2.08 KB

Hi,
I modified the patch above for a D7 db_query().

enjoy

Status: Needs review » Needs work

The last submitted patch, publication_date_edit_d7-969318-5.patch, failed testing.

sime’s picture

Version: 6.x-1.1 » 7.x-1.x-dev
Assigned: math0ne » Unassigned
StatusFileSize
new2.06 KB

Rerolled the patch in #5 minus the dsm()

Changing the issue version to 7.x (so that maybe the bot will succeed).

sime’s picture

Status: Needs work » Needs review
sime’s picture

Oh, I totally got the node ID wrong on my patch file name, soz about that.

dgtlmoon’s picture

Status: Needs review » Needs work

I see

Notice: Trying to get property of non-object in publication_date_form_alter() (line 124 of modules/contrib/publication_date/publication_date.module).

dgtlmoon’s picture

Status: Needs work » Needs review
StatusFileSize
new2.06 KB

Removed dsm from sime and form warning when adding a node (no $node->published_at) was present

sime’s picture

Sorry @dgtlmoon, i thought i got rid of that!

dgtlmoon’s picture

@sime: its ok, but im scared that you're using die(), you use a breakpoint debugger right? :)

cesareaugusto’s picture

Will it be merged into the main release?

dgtlmoon’s picture

@cesareaugusto yeah, can you test that patch for us?

cesareaugusto’s picture

Sure I can! Though I don't know how to apply patches. Could it be merged into the downloadable dev release?

dgtlmoon’s picture

youll have to learn how to apply the patch, sorry

dgtlmoon’s picture

Another patch, $node->published_at is always set, and thus it can be (bool)false, only set the #default_value if it is not false

wickwood’s picture

The patch in #18 is useful, but it throws this error when creating a new node:
Notice: Trying to get property of non-object in publication_date_form_alter() (line 126 of /path-to-site/sites/all/modules/publication_date/publication_date.module).

wickwood’s picture

I think the problem that I reported in #19 is due to the fact that the $node object does not exist.

I fixed line 126 by changing it from:
if ($node->published_at) {
to
if ($node && $node->published_at) {

Sorry I don't have patch for you.

Steve

tobyontour’s picture

I had a look at the patch and it didn't work with new nodes (only updates). I modified it a bit and recreated it to use the node form rather than hitting every form.

Status: Needs review » Needs work

The last submitted patch, 969318-node_form_alter_for_publish_date-4.patch, failed testing.

tobyontour’s picture

I'm an idiot. This one should work.

tobyontour’s picture

Status: Needs work » Needs review
dgtlmoon’s picture

hmm nope, above patch still causes an error when the field is left blank

dgtlmoon’s picture

Status: Needs review » Needs work
tobyontour’s picture

I'm not getting an error. What error is it giving?

dgtlmoon’s picture

Try this patch, it add's significant testing and a slight refactor of the save process

dgtlmoon’s picture

Status: Needs work » Needs review
StatusFileSize
new9.33 KB

woops

soulston’s picture

Status: Needs review » Reviewed & tested by the community

No errors here :)

klokie’s picture

FYI the patch in #4 worked for me (D6). Thanks!

Grayside’s picture

#29 works in OpenPublish.

elmertoft’s picture

Patch in #29 works for me on latest D7 :)

dgtlmoon’s picture

Status: Reviewed & tested by the community » Fixed

Great, committed to 7.x-1.x, thanks for the reviews!

elmertoft’s picture

Thanks Leigh. Keep up the good work! :)

dgtlmoon’s picture

ha, hey Andreas :)

Status: Fixed » Closed (fixed)

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

  • Commit 0e423e1 on 7.x-1.x, 7.x-2.x by dgtlmoon:
    Commit patch from #969318/29