MSP01
Members-
Posts
93 -
Joined
-
Last visited
Everything posted by MSP01
-
Well few hooks did the trick. Feels a little hacky but if it works, it works!
-
We have a need for enforcing the use of TFA TOTP on users. But neither Register Login Pro or Processwire in general seem to offer much help with this. Specifically TOTP needs to be turned on and then the QR code should be provided on first login attempt if TFA hasn't been added yet. Has anyone done anything of the sort?
-
I'm getting this error when trying to access the field, or any page that is using the field. "Expecting Hex color string (length 6 or 8 digits) with optional leading '#'" I believe it's because I first selected hex output and later changed it to rgba. The error is basically breaking every page where the field is used. Some more information. Temporarily editing out line #84 in FieldtypeColor.module allowed me to fix the defaul value that was crashing the module. It seems that if default value has an alpha value it will cause a crash. But now I'm running into an another issue. Allowing user to select alpha causes this error: "InputfieldColor: Submitted value: rgb(0, 0, 0) does not match required pattern: /#?[a-fA-F\d]{6}/."
-
Usability improvements for Setup > Fields in backend
MSP01 replied to MSP01's topic in Wishlist & Roadmap
You know what, I've never in my life tried the search. I'm not even sure what I thought it was for. It's a little slow, but still great improvement! -
Sometimes when you have a lot of fields, finding one you want to edit can be bit cumbersome. I like to organize things with tags, but I've lately noticed that they really just slow you down and using the browsers search is probably the quickest way to find the right field, as long as you know what it's called. But if your tagged field groups are closed browsers search wont be able to find the field until you open the group... So would it be possible to add one of these options? A) Ajax search field that would show you a list of fields that match the search criteria B) A simple checkbox or button that would open / collapse all the tagged field groups at once so you can use browsers search to find your field Of course if someone has made an extension to do this, do let me know. ?
-
Seems to be back to normal now, about 8 seconds this time. About 3 seconds of that is two .js files and one .json that are giving 404 though. I was a little shocked first time I opened the page, had a serious 14.4 Kb modem flashback. ?
-
Your pages homepage took more than 5 minutes to load. Inspector shows that almost every image with took more than minute. You might want to take a look at that pagespeed module, can't imagine it doing anything good.
-
Nice site. My only critique would be to remove the UIKIT transition from the thumbnails. It gets tiring very quickly and it's kinda gimmicky.
-
module PrivacyWire - Cookie Management & async external asset loading
MSP01 replied to joshua's topic in Modules/Plugins
Interesting module for GDPR. Is there records of consent storage or Google consent mode somehow available? -
Solution: Just added one folder between root and the site and it started to work. Probably could have fixed through .htaccess as well, but what ever works. -- I just did a local copy of a Processwire site and I run it on XAMP on windows. Admin and rest of the site work just fine, but whenever I try to go on homepage, the browser downloads the index.php at the root of PW instead of running it as PHP. Been trying to google about it, but after a day of poking around it I haven't been able to figure it out. PW version is 3.0.210, PHP is 8.2.4 running on XAMP.
-
Would it be possible to get all the finnish translations to one place and have an up to date links here and in the language module list? Currently it seems to take quite a bit of detective work to find the translations. Finnish language in the modules as an example has a link that leads to 404 page: https://processwire.com/modules/finnish/
-
Finnish translations seem to be currently located here: https://github.com/apeisa/Finnish-ProcessWire
-
Sending images using "$mail->AddEmbeddedImage" works well from frontend, but if I run the same code from backend the image will not appear in the email. First I thought content-type was the problem (for some reason it changes from multipart/alternative to text/html when sent from backend), but after I fixed it the problem persists. In this case I send an email based on data on a page. Email can be sent by filling a form on frontend, but also through backend by using checkbox and saving the page. Image in question is saved on another page.
-
I have a template file where I need to set $page->of(false) and then save a variable in a field. This seems to break the frontend, specifically combo fields. Settings the $page->of(true) after saving doesn't seem to do anything either. How to does one fix something like this, or is $page->of(false) something that shouldn't be used inside a template file? I'm pretty sure I've done this a lot in the past without running into issues with it. Edit: Some additional information. The saving is done inside a function where the page is passed to. $page->of(false) and $page->save() seem to work fine, but $page->of(true) does nothing. I've solved this temporarily by putting $page->of(true) right after the function call, but it seems like bit of a hack.
-
Is the code in a template file and does that template use pw-regions? I had a problem where a form was defined as variable at the top of a template file outside of the pw-regions, and then echoed inside a region later on on the same file. This caused it send mails twice each time someone used the form.
-
@horst This could work, but I'd rather keep things very literal. A check box that says "don't show this page to certain people" is more clear than setting them hidden. @Robin S I could of course do that, but I'd really rather not. There are a lot of these pages, and there's a lot going on under the hood. I'd have to change code all over the place and it's what I'm trying to avoid in the first place. Sorry if it seems I'm trying to find the most difficult way to do a simple thing. If there's no easy fix via hook, I'll just do it manually in the code. ? It's also possible there will be need to hide pages from more than one group while showing it to other groups in the future and Horst's suggestion wouldn't work in that case. Neither would the template. Or at least I wouldn't want to create a new template every single time something like that came up. It seems like a very heavy way of doing something that should be handled within a page itself.
-
I have a template that is used on many pages, but some of those pages need to be disabled from guest users. An addHookBefore('Page::render'...) works fine for throwing a 404 if someone actually gets on the page. But is there a way to disable those pages in site navigation, and any other place where they might be visible in one fell swoop? I thought that addHookAfter('Page::viewable'...) could work, but I haven't been able to make it do anything at all. Basically I'd love to have a way to disable those pages without going through every single $pages->find() and similar piece of code where those pages might crop up. Using access rights would be the easy way, but I cannot change the template and most of those pages are public.
-
ProcessPageLister and pagination in a module
MSP01 replied to MSP01's topic in Module/Plugin Development
Thanks Robin, that worked perfectly. -
I'm trying to make a simple module to help handling some specific pages. There's a simple dashboard and under that a page with ProcessPageLister, like the simplified example below. public function ___execute() { // Dashboard } public function ___executeBrowser() { // Browser $browser = $this->modules->get('ProcessPageLister'); return $browser->execute(); } Problem is when you use the pagination ProcessPageLister creates, you end up in Dashboard instead of staying inside the "Browser". What should I do to make this work correctly?
-
This is more general question but relates to need to add external file manager to PW's CKEditor (earlier message below). We have managed to call Responsive Filemanager in CKEditor, but the server is giving Server error 403 since I believe PW's .htaccess is blocking external PHP files. There is a PHP file dialog.php which have to be called in plugin config to run Responsive Filemanager plugin. Is there (a safe) work around this? Should it be run outside PW or some javascript solution?
-
Pretty straightforward selector string: $pages->find("template=whatever, name=pagename"); This works fine on default language, but if I change language it will only find pages if name= matches the name on default language. To find the page on second language, I need to add the language id after the name field like this: $pages->find("template=whatever, name1013=pagename"); Where 1013 is the id of the second language. Version of PW is 3.0.184, all the usual language fields and modules are enabled nor did I find anything weird in the backend. Anyone got any ideas?
-
Ah I see, I have a hook that auto generates names for these pages so that was the culprit. Checking for status 'trash' before doing the name change solved this problem.
-
Alas it was pretty fruitless: Array ( [restorable] => [notes] => Array ( [0] => Page name does not contain restore information ) [parent] => ProcessWire\NullPage Object ( [id] => 0 [name] => [parent] => [template] => ) [parent_id] => 0 [sort] => 0 [name] => [namePrevious] => [name1019] => [name7200] => [name7201] => [name7752] => [name7753] => [name7754] => ) How ever if I just echo $trashedPage->name; I will get out the data as usual.