-
Posts
10,912 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
No ideas are silly - just looking for a consensus before making any changes.
-
Maybe, but on my Mac keyboard, the ALT key is closer to Enter than the CMD or CTRL keys, so for me that is the easier thing to use to clear and run. How many people out there are using the actual "Run" button instead of the shortcut? I know I do occasionally on page reload when the console isn't in focus, but it's not often. I guess my reasoning for a "Clear Results" button, rather than clearing by default is to keep it a little similar to the behavior you see with a regular terminal/command line where you have to explicitly clear what has been returned. Any strong feelings on this? PS - if we had two radios then we need to decide whether that status should be remembered or reset - sounding unnecessarily complicated to me
-
I'm happy to adapt if needed, but to be honest I almost always use the ALT+Enter option to run the code which automatically clears before running: "Enter PHP code, then use CTRL/CMD+Enter to Run, or ALT/OPT+Enter to Clear & Run." Does this work for you, or do you still think we need a change?
-
Seems to be fine now - before I couldn't get the css files to load, so there was no page styling at all. I did reload a couple of times to check. Maybe it was an issue with AIOM, or some network glitch, but the css on other pages was ok. Maybe nothing to worry about, but I would suggest keeping an eye out.
-
Just a quick note - the "Page Delete" module is obsolete - that functionality has been in the core for quite some time now.
-
@webhoes - the site looks fantastic, but just wanted to let you know that some pages are having css issues, eg: https://chrysemys.nl/habitats/ and https://chrysemys.nl/verspreidingen/kansas/ I expect there are many more also.
-
back to the roots: problems with simple hooks :(
adrian replied to bernhard's topic in API & Templates
Hey @bernhard - I just PM'd you with a new version that should work as expect with ready.php and hooks inside it. If you can test for me, hopefully I can get a new version released. Thanks! -
There are some links and also some code for creating repeaters and adding fields to it here: Shouldn't be anything special about doing it from a module. HTH.
-
Nope - you just select the template of the parent page and the template that you want to use for the child pages from the module config settings. It should be pretty obvious once you start with it.
-
Hey @onjegolders - I just tested @mr-fan's version of this script (which makes it a configurable module) and it works fine for me in PW3. The new page are created as direct children of the page where the bulk images are uploaded. The only thing I noticed that seemed a little weird is that if no description for an image was entered, the child page title used the name of the image directly including the file extension. I have created a PR which improves this: https://github.com/mr-fan/AutoImagePages/pull/1 Until that is accepted, please check out my fork: https://github.com/adrianbj/AutoImagePages
-
Hi @Klenkes - I decided to go with #2 - now BCE will only apply the "purify" sanitizer if the field that is being populated/updated has the HTMLPurifier enabled. Could you please test at your end to make sure it works as expected? Thanks!
-
I do use the $sanitizer->purify option with all content added via BCE, so that will be the source of the problem for sure. I can see two possible options here. 1) Add a BCE config setting to enable you to turn off the purifier sitewide and/or per parent page. 2) Check the purifier status for the field that the content is being added to and respect that. Any thoughts? PS if you want a quick fix, just edit this line: https://github.com/adrianbj/BatchChildEditor/blob/ba228d2f011d306345f02ec4aa19d090f2d89481/BatchChildEditor.module#L1448
-
back to the roots: problems with simple hooks :(
adrian replied to bernhard's topic in API & Templates
Hey @bernhard - I spent quite a bit of time looking into this the other day with no success. It turns out it's not just hooks inside ready.php - it seems like ready.php is never called at all from the Tracy console panel. I will investigate further, but so far a bit of a mystery. I thought perhaps it was an issue with ajax calls (which the console panel uses), but a normal ajax call results in ready.php being called, so really not sure at the moment. I'll see what I can figure out. Cheers, Adrian -
How to echo the lowest value from a Page Table?
adrian replied to PWaddict's topic in General Support
You could also just do this. By using "first()" you avoid the need for the foreach loop. $cart->renderPriceAndCurrency($release->children("limit=1, sort=pad_price")->first()->pad_price); -
You could also use Batch Child Editor's edit mode to change the status of all 500 children at once. Simply click the checkbox for the "Unpublished" label and that will uncheck it for all child pages.
-
back to the roots: problems with simple hooks :(
adrian replied to bernhard's topic in API & Templates
To follow up more - I just tried this in init.php: bd('test init'); $this->addHookAfter("Pages::saved", function($event) { bd('test init inside hook'); $this->log->save('debug', 'saved hook'); }); and this in ready.php: bd('test ready'); $this->addHookAfter("Pages::saved", function($event) { bd('test ready inside hook'); $this->log->save('debug', 'saved hook'); }); and got this response when running from the console panel: So, ready.php is being called, but hooks inside it are not - weird -
back to the roots: problems with simple hooks :(
adrian replied to bernhard's topic in API & Templates
Hi @bernhard - I am not really sure why at the moment, but if you move your hook to init.php (instead of ready.php), it works when the code is run from Tracy's console panel. So it looks like for some reason ready.php is not being called from the ajax call that the console panel makes when running code. Does that help? -
@Klenkes - a simple solution to this would be for you to manually change the "data" field in the "modules" db table from "text" to "mediumtext". I'll see if I can get Ryan to do it in the core so it's always available. https://github.com/processwire/processwire-issues/issues/321
-
The best option would be if you could please post an issue on Github: https://github.com/processwire/processwire-issues Thanks!
-
Just looking at this now and it actually looks like this is the same behaviour as the PW core. Try disabling this module and manually change an additional language "name" for a page. Sometimes I get the integrity constraint violation and other times it actually names the page the same without an error and without adding a "-1". Can you please confirm the same behaviour at your end and if so, maybe this should be fixed in the core instead.
-
Hi @titanium - sorry for the delay - turns out this was a new problem with the multi-language title info that was added recently. Please test the latest version and let me know if you have any further problems.
-
@sanstraces - depending on your actual needs, this might also be an option:
-
TracyDebugger's "production" mode has the option to email for various error types. https://processwire.com/blog/posts/introducing-tracy-debugger/#production-mode-error-logging-and-email-notification
-
As far as I know ffmpeg is the only solution for being able to create poster images. That said, I haven't looked into this is a few years, so maybe now there is. If you find an alternative I might be able to implement it within this module.
-
Do you have ffmpeg and ffmpeg-php installed and running correctly? Maybe that's not the issue and there is something else new that is breaking poster generation, but please confirm that you have those.