Jump to content

Recommended Posts

Posted

Hello, our customer doesn't like the fact that they have to first add a title and then add the other info in the form. Therefore, we've enabled the way to skip this by making a temporary file before saving.

But the problem is that by using module schedulepages in this piece of code in the module:  

if (!$page->isNew() && $page->publishable() && $page->isChanged('status') && $page->is(Page::statusUnpublished) && $page->publish_from) {
            $this->session->error($this->_("“Publish From Date” field was cleared to prevent the page from being unintentionally re-published on the next Lazy Cron run."));
            $page->publish_from = null;
            $page->save('publish_from');
        }

it fires even with the temporary file and therefore after first save it resets the publish_from field. Is there a way to check if template is temporary, or something along those lines?

One solution is just to ask the customer to first save the form after adding a title, but I don't see that as a good solution.

Posted
17 hours ago, Zeka said:

@VeiJari What do you mean under "temporary file"?  

@Zeka

In template settings advanced "Tila" means status so I'm referring to this "temp unpublished" status.

image.png.890d186f8b98d60d5cd0dfc4b69da3ae.png

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...