Closed pReya closed 2 years ago
hi @pReya i am on parental leave right now so i do not have the time to debug this right now. can you help me out a little bit.
1) does it work if not using the -v
option
2) verbose mode in janitor triggers a check using regex looking for images https://github.com/bnomei/kirby3-janitor/blob/60cd6ed5750cf496266c96b7155d854d16d2ecc9/classes/RenderJob.php#L158 maybe you can see what causes the issue? like dump and die content of first verbose check?
thanks
I'm running into the same issue testing out Janitor on local dev site.
janitor render
is also causing the same error for me in with the starterkitV3.6.1.1
When using the fresh plainkit, janitor render
is working. In this instance there are only two items in the /content
folder: site.txt
and home
.
Changing content/home
to content/1_home
, causes the bug to happen.
Adding a new listed page e.g content/1_example-page/default.txt
also causes the bug to happen.
thanks @maxackerman that makes it easier to replicate. i will try to fix this asap.
I ran into the same problem and just had a look on classes/RenderJob.php
. I’m not quite sure, but it seems to be a problem with the regex on line 141:
140 if (strpos($id, '_drafts') === false) {
141 $ids[] = preg_replace('/\/\d+_/', '/', $id);
142 }
Since the relative pathname is not preceded with a slash (at least for me on valet), we could conditionally check for either the beginning of the string or the slash:
140 if (strpos($id, '_drafts') === false) {
141 $ids[] = preg_replace('/(^|\/)\d+_/', '/', $id);
142 }
Is this the best way for you, @bnomei? Should I add a pull request? (I’m not that much into GitHub stuff, but would be happy to help.) Thanks for your great work!
i have not had the time to take a look myself yet. thanks for your input. you dont need to do a PR for that since i would need to test it anyways.
I've set up a brand new starterkit on Laravel Valet, installed the plugin and ran
php janitor -v render
. This is the output I get. Any idea why this happens?