-
Posts
2,930 -
Joined
-
Last visited
-
Days Won
19
Everything posted by szabesz
-
First of all, thanks for your work on this! You mean all four repos? I starred them all. Another question: maybe I'm blind a bit, but I cannot find any search function on the site. We can always use Google, like https://www.google.hu/search?q=hook+site%3Aprocesswire.recipes but Google might not be always up-to-date for a while, I guess.
-
The issue is here: https://github.com/uiii/AdminHelperLinks/blob/023a5bc75028713ebcfea1212132cbe00867a024/AdminHelperLinks.js#L134 There is no need for the extra forward slash before '/setup....: ProcessWire.config.urls.admin + '/setup/template/edit?id=' For some reason it no longer works in newer PW versions but it is not needed anyway.
-
new install - how I can get rid of the markup regions?
szabesz replied to gunter's topic in Getting Started
You always get normal delayed output out of the box, even if $config->useMarkupRegions is set to true by default. Markup Regions is never enforced, and even though it is turned on by default it just sits there to be used. If you do not need it, you can disable it for performance reasons, of course. -
Error: This page may not be placed in the trash
szabesz replied to rastographics's topic in API & Templates
Also, anyone in need for a fix for this, please give a thumbs-up at the GitHub issue so that Ryan can see how "popular" (or rather: unpopular) this issue is. -
Error: This page may not be placed in the trash
szabesz replied to rastographics's topic in API & Templates
I also wanted to do this and was surprised that this is not possible so I had to code around this. -
How to programmatically clear the page cache?
szabesz replied to PawelGIX's topic in General Support
It looks to me that the post above was generated by ChatGPT. It begins with "In ProcessWire,..." and ends in "Keep in mind that...". I doubt that copy/pasting ChatGPT results is a good way of discussion. -
Maybe it's a limitation and not a bug. ProcessUser is for the admin where PW lets the current user with correct permissions edit users. However, on the frontend, users get "more protection".
-
@Pip Could you please put your very long code blocks into spoiler blocks this rich text editor provides? (Just use the eye icon in the toolbar.) Topics like this with extremely long code blocks are pretty hard to digest. Thanks in advance.
-
Hello, Please note: Also, CKE is going to be retired in the not so distant future, TinyMCE is taking its place. Back then, tpr put countles hours of work into AOS. I can be wrong, but I'd bet he can no longer support it due to lack of free time, especially anything CKE related.
-
@Macrura There is a console.log($(this)); left in simplemde_init.js: https://github.com/outflux3/FieldDescriptionsExtended/blob/f550084f25ea32cecfe0b9879bf46bc23b3b03ac/simplemde_init.js#L12 Next time you update the module, could you please comment it out? Pretty useful module, BTW. Thanks for sharing!
-
Hello, Probably, it is the find() or a "similar method" (which also begins with the word find) is the one which you should use, not get(), see: https://processwire.com/api/ref/pages/ $pages->get() : Returns the first page matching the given selector with no exclusions. Meaning with get() you get one page only without checking any kind of status nor access control.
-
Thanks Adrian! I simply postponed upgrading the module. Next time I work on that site, I will surely try to upgrade it base on the info you provided above.
-
ace-editor folder is huge, do we need all that stuff?
szabesz replied to szabesz's topic in Tracy Debugger
Quite agree! Personally I never implement anything relying on CDN because of the possible issues with external dependencies. -
ace-editor folder is huge, do we need all that stuff?
szabesz replied to szabesz's topic in Tracy Debugger
I quite understand it, so please simply forget my question if such a task would add any considerable amount of time to the maintenance of the module. I just saw that in your Admin Actions module the Ace editor files add up to only about 1MB, and I simply use Ace in these modules the way they are configured by default, and I will highly probably never be interested in more than that. So to me, what is not used is just "ballast". Looks like the distribution directory of this editor is about the same size as Ace's (maybe even a bit bigger) and if so, it might not be an answer to the "issue". Also, (quote) "The Monaco editor is not supported in mobile browsers or mobile web frameworks." which is not an issue to me as I never use the ProcessWire admin on a mobile, so I do not even know if Ace supports that or not. -
Hi, You could hook after "InputfieldText::processInput". That way you can also check for the uniquness of the name/title if you need to, and add your error messages as needed. Here is a similar hook I use in a project: <?php namespace ProcessWire; wire()->addHookAfter("InputfieldText::processInput", function ($event) { /* @var $page AddonPage */ $field = $event->object; if ($field->name == "suffix") { $page = modules()->ProcessPageEdit->getPage(); if ($page->template != "addon") return; //The final title and name is based on the fields: addon_addon + suffix (both are text fields) $suffix = $field->value; $suffixFormatted = " (" . $field->value . ")"; $addon = session()->get('addon_addon'); session()->remove('addon_addon'); $titleNew = empty($suffix) ? $addon : $addon . $suffixFormatted; $nameNew = wire()->sanitizer->pageName($titleNew, true); $uniqueName = pages()->names()->uniquePageName($nameNew, $page); $titleSelector = wire()->sanitizer->selectorValue($titleNew); $existingPage = wire()->pages->get("template=addon, title={$titleSelector}"); $hasErrors = empty($addon); if ($existingPage->id == $page->id && !$hasErrors) { //bd("Page name has not changed, he have no errors, so no need to proceed..."); return; } if ($existingPage->id != 0 || $hasErrors) { //bd("We had errors, we need to clean things up..."); $titleUntitled = "addon-" . date("YmdHis"); $nameUntitled = wire()->sanitizer->pageName($titleUntitled, true); $uniqueNameUntitled = pages()->names()->uniquePageName($nameUntitled, $page); $page->name = $uniqueNameUntitled; $page->title = $titleUntitled; $page->addon = $addon; if ($hasErrors) { session()->error("Errors listed below must be fixed for this add-on to be saved properly!"); } else { session()->error("Title is already in use by an existing one (ID '{$existingPage->id}'). Either change the Label and/or add a unique suffix!"); } } else { //bd("No errors, We can save provided values..."); $page->title = $titleNew; $page->name = $uniqueName; } } }); Note that the admin "new page creation process" skips the step asking for the title in the first place, so I had to handle the case of blank values as well when the user abandons the complete process of creating a page with the required text fields being filled in and saved.
-
Happy new year to all! @adrian My question is in the title :) The ace-editor folder is ~11.7MB with ~444 files, along with snippets, themes and such. Personally, I do not think I/we need them all. Would it be possible to make it a lot slimmer somehow? cheers, Szabesz
-
Your list is exactly what I wish for as well, I have nothing to add. I gave it a thumbs-up. Ryan's time to work on ProcessWire is limited and being the only one to stear the boat, naturally, he needs to prioritize. I think the most important issue with implementing and maintaining migrations is that it is a HUGE effort, and Ryan would need to add support for his Pro modules as well. Again, he only has 24 hours a day. I cannot even imagine who would have the time to rewrite the admin theme from scratch. However, if Ryan ever wants to move it forward to the next level, he needs to move his mindset to the reactive era, probably HTMX + Alpine.js. If we drop support for the others, people would surely use AdminThemeUikit :P
-
I'm in! Maintaining AOS would be just too much work for even the most experienced, I think, so no wonder @tpr is no longer interested in it, especially that he no longer uses ProcessWire. Also, AOS mostly supports the Default or Reno admin themes which we should deprecate, IMHO.
-
Still implementing pages is essential, I think. Thanks for the addition.
-
Thanx @gebeer for sharing! As a side note, anyone implementing infinite scroll, be aware that a simple and basic implementation can lead to very bad UX, see for example: https://builtin.com/ux-design/infinite-scroll So it is a lot of work to implement it from scratch if one wants to provide something that is not pita for the user.
-
It is surely not "actively" maintained. The question is, will it ever be maintained at all?