Jump to content

Recommended Posts

Posted

Hm, I just realize that I can only check if a page is saved as “unpublished”. But I can’t catch that moment when a published page is saved for the first time with the “Unpublished: Not visible on site” checkbox checked, so that the page is now unpublished. Or can I?

If I add the rule I thought of (see below), this would mean that saving an unpublished page – whether it has ever been published or not – with a publish_from date which is older than the current timestamp.

if ($page->is(Page::statusUnpublished) && $page->template->hasField('publish_from') && $page->publish_from < $currenttime) {
    $this->session->error($this->_("“Publish From Date” field was cleared because it contained a date which lies in the past. This would have caused the page to be (unintentionally) published resp. re-published on the next Lazy Cron run. Obviously this was not your intention since you chose to only save and not publish the page."));
    $page->publish_from = null;
    $page->save('publish_from');
}

As a consequence a user would no longer be able to save a new page as “unpublished” with a publish_from date which lies in the past.

Comparison:

  • With the current version of the module this new and unpublished page will be published resp. re-published on the next cron run.
  • With the additional code above the publish_from field is cleared, the page will thus remain unpublished and an error message informs the user about what happend.

I think this behavior is more logical than the current one. But it definitely changes the way the module handles publishing dates from the past on unpublished pages. So if some users rely on the present behavior as part of their workflow, they would have a bit of a problem.

  • 3 months later...
Posted

I wondered why the module wasn't working on included pages (like tablefield pages). I thought this to be a bug, it's not.

The module actually works!  - What actually was the problem was: The find section for identifying the pages which need work could include an "include=hidden". 

So all the hidden pages also benefit from this great feature. - Endless possibilities! :-)

UPDATE: Forget this message: Adding include=hidden makes no difference. I simply had a problem with my cache. Sorry. Is scheduler honoring the ProCache on status changes?

Posted

ProCache does skip PHP all together and goes directly from htaccess to the cached html, therefore it doesn't honor anything, if you do not set it up to reset the cache properly on the needed status changes.

  • 1 month later...
Posted

I have the following issue, with PW 2.7.2 and the current SchedulePages Version:

when using the datepicker, it outputs "hh" and "ss" string, which ovisously causes errors, when one publishes the page

post-620-0-97084800-1453458588_thumb.jpg

Posted

The modules does use standard datetime fields, therefore if other datetime fields do suffer from the same issue it's probably a core issue.

Here's what solved the problem for me. Left page original settings of the auto generated publish fields, right page are my modification of the settings. no more "hh" and "ss" strings and the page scheduling works now 

post-620-0-89765800-1453974552_thumb.jpg

so maybe for some reasons time formating options that need to be choosen was missed by the auto generated post_from/post_until fields, which i did'nt touched since creation.

  • Like 3
Posted

I'll try to look into this as soon as possible, but if someone already fixed it and can submit a merge request it would be a great help.

//Jasper

  • Like 2
  • 3 months later...
Posted

I have tried to install this module on PW 3.0.17 - it doesn't want to install. Asks for "LazyCron" which is istalled (core).

Any chances for an update?

I had to install LazyCron manually and it works now - sorry!

  • 5 months later...
Posted

I found a conflict with PW 3:

I could not duplicate a page from the page tree. Messages on page tree page (default Admin):

Bildschirmfoto 2.png

Bildschirmfoto.png

Maybe some checks about the publishing should be left out when a page is just beeing duplicated.

I.m.h.o the publish_from and publish_until fields should be simply cleared for the fresh duplicate (even if required)?

(Or is this something I need to report as PW issue?)

Posted

Looks like I have made the following patch locally:

-        if ($page->isChanged('status') && $page->is(Page::statusUnpublished) && $page->publish_from) {
+        if (!$page->isNew() && $page->isChanged('status') && $page->is(Page::statusUnpublished) && $page->publish_from) {

Possibly related :)

  • Like 3
  • 3 years later...
Posted
On 1/28/2016 at 10:50 AM, Chris said:

Here's what solved the problem for me. Left page original settings of the auto generated publish fields, right page are my modification of the settings. no more "hh" and "ss" strings and the page scheduling works now 

post-620-0-89765800-1453974552_thumb.jpg

so maybe for some reasons time formating options that need to be choosen was missed by the auto generated post_from/post_until fields, which i did'nt touched since creation.

Thanks for this.
I want to show this error for better search results: WireDateTime: The parsed time was invalid

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...