-
Posts
426 -
Joined
-
Last visited
-
Days Won
12
Everything posted by monollonom
-
If your CRON is directly calling your template’s php file then yes it won’t work because ProcessWire isn’t bootstrapped. For a client I’m also using a CRON job that calls: "wget -qO /dev/null https://myclient.com/path/to/page". It basically triggers a GET request and thus renders a page with my script in it (it also sends an email). But it seems OVH only allow to execute a php script so maybe you should look into bootstrapping PW, something like: <?php namespace ProcessWire; include("/path/to/your/pw/installation/index.php"); $pages->get("/your/mailer/")->renderPage(); Regarding your LazyCron PageRender::renderPage is not a static function so it wouldn’t work this way, you should instead do something like: <?php namespace ProcessWire; // in your init.php or ready.php $wire->addHookAfter('LazyCron::everyDay', function(HookEvent $event) { $event->wire()->pages->get("/your/mailer")->renderPage(); $event->log("mailer sent"); }; I’m only surprised by this, maybe they changed something in the meantime...
-
WebP as source/input images - expected behaviour?
monollonom replied to Peter Knight's topic in General Support
Did you check https://processwire.com/modules/webp-to-jpg/ ? -
[deleted]
-
Do you mean your LazyCron hook is not triggered?
-
It's because of the parenthesis in your pages’ title which, unescaped, act like OR groups. Actually it’s because of the commas 🙂 Try using IDs instead and then in your selector: "winner_name=$ids"
-
With a quick search it looks like this is an issue from OVH rather than from PW. Do you have enough traffic to consider using LazyCron instead?
-
New namespaced version - beta testers wanted.
monollonom replied to adrian's topic in Tracy Debugger
Ah! My bad I misread your first post. I don't think I have a local setup with a non-namespaced TracyDebugger but if I do find one, I'll try to update and let you know if anything goes wrong. -
-
New namespaced version - beta testers wanted.
monollonom replied to adrian's topic in Tracy Debugger
I've actually spotted it as a branch on your github and have been using it for some time now. I didn't face any issue as far as I can tell, though I'm using it very lightly, mostly for bd() calls and the console. -
Given RepeaterMatrix is based on Repeater there are no differences performance wise. Actually I did it exactly this way for a project before I purchased ProFields so there’s nothing wrong with that. It’s (mostly) about convenience.
- 3 replies
-
- 1
-
-
- repeater
- field dependencies
-
(and 1 more)
Tagged with:
-
Try to reference the ID instead: section_type=6|7
- 3 replies
-
- 1
-
-
- repeater
- field dependencies
-
(and 1 more)
Tagged with:
-
Thanks! All of them are built using ProcessWire, it's my tool of choice ever since I got introduced to it close to 10 years ago 🙂
- 11 replies
-
- 1
-
-
- markup regions
- template
-
(and 1 more)
Tagged with:
-
The idea is to have the _main.php be the base for most of your templates and then on a case-by-case basis disable it per template and specify another appended file, e.g. _rss.php. So I would say no need to change anything in config.php 🙂
- 11 replies
-
- 2
-
-
- markup regions
- template
-
(and 1 more)
Tagged with:
-
When should I use $sanitizer vs field text formatters in ProcessWire?
monollonom replied to zilli's topic in General Support
As long as the output formatting is on you can assume your "$page->title" will return a formatted value and so in your case with the entities encoded thanks to the Textformatter. So no need to escape it again using $sanitizer. $sanitizer is mostly here to clean inputs from user-submitted forms or more broadly whenever you have to save external data you don't have control over. -
If you check the "Disable automatic append of file: _main.php" setting, then you can specify your "base.php" to be appended in place using the field right above
- 11 replies
-
- 1
-
-
- markup regions
- template
-
(and 1 more)
Tagged with:
-
Blank page after installing on third level domain
monollonom replied to Manaus's topic in General Support
Do you mean you removed these manually? If so then the installation must have failed as these are supposed to be deleted automatically once the admin account is created. -
File access control at field level rather than template
monollonom replied to DrQuincy's topic in General Support
Funnily I tried exactly this yesterday and no unfortunately it doesn’t work because the repeater will check the access control of the page holding it. However it could a request to add a line to check if its access control is on, something like: public function getAccessTemplate($type = 'view') { if($this->template->useRoles) return $this->template; $p = $this->getForPageRoot(); return $p->id ? $p->getAccessTemplate($type) : parent::getAccessTemplate($type); } I tried and it worked but it wasn’t a fit in the end for what I was trying to achieve. -
I had to push a small update as I noticed on a new installation that it seems you cannot send an empty <mjml></mjml> tag anymore. The fix was rather simple: add a <mj-body> and it stopped complaining.
-
I just pushed a tiny update to make adjustements to the CSS for the new Konkat theme. It’s just some spacing details and it now uses the --pw-border-color CSS var (and falls back to the original theme color if not set).