Hi!

I don't know if this is the right way to do what I want - please excuse me if not.

I need the schedule.module to run under version 4.7-beta. But I don't have the knowledge to update the module for myself. Is there anybody or any way to get it work properly?

TopperDEL

Comments

wulff’s picture

Version: » master
Component: Miscellaneous » Code
Assigned: TopperDEL » wulff
Status: Active » Needs review
StatusFileSize
new11.94 KB

The attached patch updates scheduler.module for current cvs head.

wulff’s picture

I should say that the attached patch updates scheduler.module to use Form API and fixes this bug: http://drupal.org/node/23919

Also, in the patch, the scheduling block is placed at the top of the page. In the final version it should probably be put in the 'publishing' fieldset.

Kieg Khan’s picture

Thanks,
This seems tork Ok, but there are two dates indicated, one to publish and one to unpublish. Seems a bit of a conflict to be able to publish and unpublish on the same dates, but I guess this is so you can set a publish and unpublish date in the one operation? This is useful if you wanted to advertise something for a short period of time.

Will this patch make it into the 4.7.x download area? Should be, function sadly lacking in 4.7

TopperDEL’s picture

Status: Needs review » Closed (fixed)

Thank you! It works fine for me!

TopperDEL

wulff’s picture

Status: Closed (fixed) » Needs review

Re-setting status to CNR to get more opinions on the patch.

hubrt’s picture

Thanks, great work, works fine.

"Also, in the patch, the scheduling block is placed at the top of the page. In the final version it should probably be put in the 'publishing' fieldset."

Both placements do make sense. In a perfect world, this would be configurable ...

fen’s picture

FYI: hunk 6 failed running the patch against the scheduler I downloaded from http://drupal.org/project/scheduler

This appears to be because the downloaded scheduler.module has this on line 306:

    print theme('page', theme('table', $header, $rows));

and the patch expects to see

    return theme('table', $header, $rows);
wulff’s picture

StatusFileSize
new11.66 KB

FYI: hunk 6 failed running the patch against the scheduler I downloaded

Did you download the CVS version of the module?

I have attached an updated patch which puts the form elements in a more sensible position on the node editing page. It also removes some trailing whitespace.

GregoryHeller’s picture

Title: Get schedule.module to work under version 4.7.x » Documentation
Component: Code » Documentation
Category: feature » support
Status: Needs review » Active

Wulff,

Would be helpful to have some documentation with the module so proper configuration and functioning is understood. Maybe i missed it.

Here is my big question (that i think i know the answer to): When you decide you want to schedule a piece of content should you not check the "publish" box? and does scheduler require cron to run to update the published state of scheduled articles?

If so, it might be good to add help under the scheduler date selector that says "If enabling scheduler to schedule the publication of this node, do not check 'published' under publishing options."

As far as install and configuration instructions i would create a file that says something like:

Scheduler Module will automatically publish or unpublish nodes according to user defined dates.
To configure scheduler module, first enable it under admin/modules.
By default, Scheduler will be configured to allow scheduled publishing and unpublishing, you may change these settings under admin/settings/scheduler
Scheduler module will change the published state of a node when cron.php is called. You must set up a cron job or use poormanscron.module to call cron.php in order for scheduler to work.
You must grant the appropriate access rights for users to access the scheduler module options. You can set these access rights at admin/access

HTH
feel free to include any of the above in documenation

wulff’s picture

Title: Documentation » Get schedule.module to work under version 4.7.x
Component: Documentation » Code
Category: support » feature
Status: Active » Needs review

If you schedule publishing of a node, its status is automatically set to 'unpublished' when it is submitted.

Scheduler requires cron to work as intended.

I'll reroll my patch to include some user documentation.

Resetting component, category and status since this issue is still primarily about getting schedule to work nder 4.7.

GregoryHeller’s picture

when i enable scheduler, the default worflow does not apply. I understand that when i submit a node, the workflow will be changed to that it is either publish or unpublished, but all the check boxes under publishing options appear checked.

This would seem to imply that i cannot use the default workflow (promote to front page, sticky at top of list, new revision, etc) apply to my nodes when scheduler is enabled?

wulff’s picture

when i enable scheduler, the default worflow does not apply.

Can you please describe this in more detail?

but all the check boxes under publishing options appear checked

The appearance of the checkboxes when submitting content should only be determined by the settings at administer > settings > content types. If changing the settings there doesn't help, please post the steps needed to reproduce the behavior.

There is no problem in using sticky, post to front page, etc. They will take effect when the node is automatically published by the scheduler.

coupet’s picture

Fatal error: Call to undefined function: form_radios() in /usr/local/apache/htdocs/sitename.com/drupal/modules/scheduler/scheduler.module on line 30

this is latest cvs module without any patch applied

wulff’s picture

That's correct. The patch to update scheduler to 4.7 hasn't been applied yet.

coupet’s picture

File to patch: scheduler.module
patching file scheduler.module
Hunk #2 FAILED at 58.
Hunk #3 FAILED at 77.
Hunk #4 FAILED at 143.
Hunk #5 FAILED at 284.
Hunk #6 FAILED at 333.
5 out of 7 hunks FAILED -- saving rejects to file scheduler.module.rej

wulff’s picture

StatusFileSize
new10.52 KB

Patch updated for scheduler v1.34.

coupet’s picture

installed perfectly; 1.) installed latest cvs version, 2.) applied latest patch, 3.) enabled module

jjeff’s picture

+1
works great.

njivy’s picture

Could this patch address the lack of tablesort_pager() in Drupal 4.7?

AjK’s picture

as above...

can confirm...

installed perfectly; 1.) installed latest cvs version, 2.) applied latest patch, 3.) enabled module

(version from CVS/HEAD 1.34)

regards
--AjK

cokeman’s picture

Hmm, how do you apply this patch under windows?

Please HELP, or attach a patched version for little old me ;)

AjK’s picture

cokeman, I tried to contact you at http://drupal.org/user/33061/contact but your profile is set not to allow contact.

regards
--AjK

cokeman’s picture

Karpuz, did send you a contact, with my email in, don't know if you got it, but I have opened for my contect page, and tested that it works....

- Cokeman

coupet’s picture

Fatal error: Call to undefined function: tablesort_pager() in /usr/local/apache/htdocs/sitename.com/drupal/modules/scheduler/scheduler.module on line 345

message is displayed after scheduling a existing node.

ref: latest cvs and scheduler.module_2.patch

wulff’s picture

StatusFileSize
new11.01 KB

Patch updated to remove call to tablesort_pager().

coupet’s picture

works great.
1.) installed latest cvs version 2.) applied latest patch (scheduler.module_3.patch) 3.) enabled module

urbanfalcon’s picture

I had independently upgraded this module to 4.7, but one thing I did differently that doesn't seem to be address is in regards to these two lines:

'scheduler_post' => array(time(), FALSE, t('Automatically post document'), t('The date at which your document will be automatically posted.<br />Do not check the enabling checkbox unless you want to schedule this document.')),
'scheduler_hide' => array(time(), FALSE, t('Automatically hide document'), t('The date at which your document will be automatically hidden.<br />Do not check the enabling checkbox unless you want to schedule this document.'))

I found it really confusing that the date/time never matched that on my computer (I guess my server is in a different time zone). It made it hard to correctly set publish/unpublish times. Likewise, there's no clarity as to what triggers the publish/unpublish events (we all know it's a cron hook, but less technical admins may not 'get' that without help). This is what I did to fix both...maybe someone would like to incorporate it into the official module? PS> For CSS junkies, I used old school font tags because they take up less memory and are shorter than span tags with color styles.

'scheduler_post' => array(time(), FALSE, t('Automatically post document'), t('The date and time (cron trigger) to automatically post your document.<br />Do not check the enabling checkbox unless you want to schedule this document. <br /><font color="red">*</font> This is for server time, which is currently: <b>'.date(variable_get('date_format_medium', 'D, Y-m-d H:i')).'</b>')),
'scheduler_hide' => array(time(), FALSE, t('Automatically hide document'), t('The date and time (cron trigger) to automatically hide your document.<br />Do not check the enabling checkbox unless you want to schedule this document. <br /><font color="red">*</font> This is for server time, which is currently: <b>'.date(variable_get('date_format_medium', 'D, Y-m-d H:i')).'</b>'))
green monkey’s picture

Druapl 4.7

Would it be possible for somone to send me a patched version of the CVS Scheduler. I've tried to do it twice manually in my editor, but I only seem to make matters worse :-(

I'k ok wiht small manual patches, but this is not going to well.

Thanks in advance

coupet’s picture

scheduler.module with scheduler.module_3.patch applied

try this one.

coupet’s picture

StatusFileSize
new12.73 KB

scheduler.module

see attached (forgot to attach earlier, sorry!)

green monkey’s picture

coupet,

Thank you so very much.

I have a large task in front of me and this was a major tool I needed to have working.

thanks again
J

AjK’s picture

StatusFileSize
new13.6 KB

Here's the same version as above with the following changes:-

http://drupal.org/node/61495 (don't publish node if in moderation queue)
http://drupal.org/node/61522 (add scheduler API functionality)

best regards
--AjK

green monkey’s picture

Thanks Ajk,

It looks I spoke a bit soon.

Thanks for forcasting I might still have some problems.

Scheduled Publish not working. Will load this and give it a spin. Silly me, I was so happy it was running, I forgot to go back and look at my work. A little surprised when I saw everything published.

green monkey’s picture

AjK,

hmmm ... that was a no go

that version took me back to the radio error again,

Fatal error: Call to undefined function: form_radios() in /home/.needle/user/mysite.com/modules/scheduler/scheduler.module on line 30

could you have posted the wrong version, by mistake?

green monkey’s picture

wouldn't I want all the patches 0 - 3 applied ?

could someone post this already patched... please - I know I'm only one cut and paste away from this working. :-)

thanks

green monkey’s picture

Working! - big thanks!

- went in and deleted sub dir
- flushed cache
- reloaded

and it worked - who knows why not the first time. Almost forgot to manually unpublish nodes and let Scheduler republish.

thanks again all

hubrt’s picture

looks good to me.

AjK’s picture

Status: Needs review » Reviewed & tested by the community
eliza411’s picture

I tried installing (cvs, 07/04/2006 - 16:15, 13.83 KB) and scheduler.module_3.patch. The patch didn't return any errors and the interface for scheduler appears, but scheduler doesn't publish or unpublish. I noticed that the [] Publish setting isn't automatically unchecked, so I tried manually unchecking that, but it didn't have any effect.

I don't need this functionality right away, so I might wait for the 4.7 release unless I'm doing something easily remedied.

Thanks in advance for any help, and thanks for working on this module in the first place!

Boinng’s picture

I just like to register my interest in getting this working... as above, I've installed a copy with all the patches, and everything [i]appears[/i] to work fine, except that it doesn't actually publish or unpublish anything! Kudos to whoever finishes off that final step..

wulff’s picture

have you remembered to set up cron?

try going to yourdomain.com/cron.php to run it manually.

Boinng’s picture

Cron is running, yep. Last time I tried to use it and it didn't show, I loaded cron.php myself to see if that would trigger it, but nothing happened.

eliza411’s picture

I had been running cron manually to test before setting it up, but I did set it up, and it's running, but scheduled actions are still not happening.

tones’s picture

Assigned: wulff » tones
Status: Reviewed & tested by the community » Fixed

m3avrck and kiles asked me to try to pick this issue up. i've commited a patch to HEAD at r1.36. i expect it's still a little buggy, so expect more bugs and patches in the coming weeks...

m3avrck’s picture

I've committed a very cleaned up 4.7 version, taking over as the new maintainer with tones per killes request.

New 4.7 branch as well.

Anonymous’s picture

Status: Fixed » Closed (fixed)