-
Posts
11,150 -
Joined
-
Last visited
-
Days Won
368
Everything posted by adrian
-
Hi @digitex - you're right about the displaying of all the child pages - this module really doesn't work well in edit with lots of children - poor design on my part :) That said, I think if you disable edit mode for branches with lots of children, you should be able to offer the CSV export mode and I think it should be ok. It won't be as capable as Lister still because Lister batches exports whereas BCE tries to do all in one batch. I really haven't used this module in a long time so I'm afraid I don't have much impetus to modify the export functionality, but hopefully it will work for you with edit mode disabled.
-
@SebastianP - fixed in the latest version - thanks to @flydev
-
Thanks for the fix @flydev - I've added it to the latest version.
-
The other thing that I think should be implemented is a better cache expiry option - given how infrequently sitemap.xml files are called by search engines, I don't really think any sort of time based expiry is much use in reality. I think it should support wireCache's selector option (set to expire when any page is saved - although on regularly updated sites, even this might not result in the cache being used very often).
-
Thanks @gebeer - I have always had a bit of a hunch this might be the case but never got around to checking.
-
Hey @bernhard - Is this how you have the complete block looking such that your new logic is only applied to objects, but when they are an array the behaviour isn't changed? BTW, this bit of code is a copy of PW's debug.inc file so you should let Ryan know about the needed change there as well. if(is_object($value)) { try { if (is_object($value)) $value = (string)$value; } catch (\Throwable $th) { try { $value = json_encode($value); } catch (\Throwable $th) { $value = $th->getMessage(); } } } if(is_array($value)) $value = print_r($value, true);
-
Currently on Digital Ocean (although will actually be moving the project to AWS shortly). I just ran a backup from the CLI and in that situation (where the timeout doesn't come into affect), it seems to have worked as expected, with both the zip and zip.enc files having the same size, but I am still confused why the .zip is kept - shouldn't that be deleted after the creation of the .zip.enc file? Actually, should both be exactly the same file size - does the encryption not result in some change? I came across the timeout when trying to run a backup from ProcessDuplicator using the native DB / local only options - I still think this need to work.
-
Just looking into that libsodium error. I see that it's being generated by Halite's isLibsodiumSetupCorrectly() function, but when I call the components from that I get the following, which suggest it should be ok. Actually, it's just a case of inverted logic in your code - note the ! where it shouldn't be. if (!\ParagonIE\Halite\Halite::isLibsodiumSetupCorrectly()) { $field->notes = __("☑️ `libsodium` setup [**OK**]"); } else { $field->notes = __("⚠️ `libsodium` setup [**FAIL**]"); }
-
Hi @flydev - thanks so much for your work on this. I've just been testing it out and have a few questions: 1) I am seeing libsodium setup [FAIL] at the bottom of the private key section in the config settings. I have libsodium-dev and php-libsodium installed so not sure where there error is coming from. Any ideas? 2) The backup seems to work as expected, but I am seeing both .zip and .zip.enc files created. Are they both supposed to remain after the backup has completed running? 3) Is is expected that the .enc version is about 2/5ths the size of the main .zip file? Actually, I think I just answered #2 and #3 - turns out I got this error Fatal Error: Maximum execution time of 300 seconds exceeded (line 23 of /paragonie/sodium_compat/src/Core/ChaCha20.php) which I suppose means the encryption didn't complete. Do you think it would make sense to override the php time limit within this process to avoid this? Thanks again!
-
The other thing you should play with is the Request Logger panel - lots of useful info collected by it.
-
Turn on Guest Dumps - "Enable Guest Dumps" button on the Panel Selector.
-
Not sure what you are making work via Admin > Access > Users, because to get BCE to work here like that, I need to replace line 185 with: if(!$this->data['allowAdminPages'] && (!in_array($this->editedPage->id, $this->wire('config')->usersPageIDs) && ($this->editedPage->template->flags & Template::flagSystem))) return;
-
I wish the sidebar actually worked well - I had hight hopes for that feature, but it just doesn't really work. Just in case you haven't ever noticed, the tree icon at the start of the breadcrumbs brings up a panel overlay with the full menu which is a really nice feature. That, together with Robin's BreadcrumbDropdown menu and life is pretty good. AdminOnSteroids does have a sticky header feature.
- 46 replies
-
- 1
-
-
Thanks @bernhard - not sure why I haven't seen that issue before - it's been a bug for a long time. Should be fixed in the latest version.
- 1 reply
-
- 1
-
-
Maybe I am not understanding what you want but this screen recording shows it working on the frontend.
- 21 replies
-
- 1
-
-
Hi @bernhard - I think the easiest way might be to set: Debugger::$editorMapping which I think you should be able to change in config.php Here is where the path is built: https://github.com/adrianbj/TracyDebugger/blob/f2fbcd88fcecad45b2ce7b428cfe80c1527c1122/TracyDebugger.module.php#L1004-L1048 but I think in your case you will want to get the current value of Debugger::$editorMapping and do a str_replace on the path set in the module setting to adjust for each user as needed. You could probably even just put a placehholder like "localpath" in the module settings and replace that with the correct path per user. Let me know if that works out for you.
-
It works to allow the user to do the rating - perhaps you're not loading all the required assets? <link href="/site/modules/FieldtypeStars/InputfieldStars.css" rel="stylesheet" /> <script src="/site/modules/FieldtypeStars/rater-js/rater-js.js"></script> <script src="/site/modules/FieldtypeStars/InputfieldStars.js"></script>
- 21 replies
-
It works just fine on the frontend for me.
- 21 replies
-
- 1
-
-
Hi Marty, I think the problem is that you don't want to protect the page that is using the portfolio template. And as I mentioned above you also don't want the if($page->protected) check. What you want is to protect the pages that have the images you're trying to restrict access to (using the option on the settings tab). Everything else will be taken care of by the module. Hope that gets you going and sorry if the instructions aren't clear.
-
Good point about the translation of "copy". As for the duplicate issue - I just tested here and uninstalling the module didn't completely prevent duplicate names. I think issue you saw might be related to pages created when you were experimenting with the Pages:cloned hook code I posted above. But please let me know if you see the problem once all those versions are removed and you're start with a fresh set of clones.
-
Try this as a replacement for https://github.com/adrianbj/PageRenameOptions/blob/8665aca5023417163841603fda8037df2ccbe245/PageRenameOptions.module#L106-L108 Not well tested yet, but wanted to give you a better idea of what I meant. preg_match('/\(copy\s?\d?\)/', $p->title, $matches); $isTitleCloned = !empty($matches) && $p->name != $this->wire('sanitizer')->pageName($p->title, Sanitizer::translate); if(!$isTitleCloned && $this->data['initialDifferencesProtected'] && !$this->wire('user')->roles->has("name=".implode("|", $this->data['exemptRolesInitialDifferencesProtected']))) { $this->wire('config')->scripts->add($this->wire('config')->urls->PageRenameOptions . "InitialDifferenceProtected.js?v={$version}"); }
-
What about if the module were to just disable the Initial Differences Protected check if the name doesn't match the title but the title contains (copy\s?\d?\) which would match (copy), (copy 2), etc. I think this approach will work better. Thoughts?
-
Hi @Robin S - sorry for the really late response. Looks like your suggestion for matching the cloned name to its title works for me. Would you mind testing at your end please. Just add this at the start of the ready method. // if cloning a page, then set the name to match the title so Protect Initial Differences works $this->wire()->addHookAfter("Pages::cloned", function($event) { $p = $event->arguments(1); $p->setAndSave('name', $this->wire('sanitizer')->pageName($p->title, Sanitizer::translate)); }); This approach also works when the copy button allows one step ajax cloning. I'll look into your sync button idea as well.
-
1) That was just to get you going - I'll make the change but I was hoping to hear back about LRP to see if I could fix that for you at the same time before committing a new version. 2) Because I don't have LRP I can't test with it to figure out why it's not working, but if someone who does have it can figure out the issue and provide a fix I'd be happy to include it.
-
Hi @Marty Walker - hope you're well! I think perhaps you don't quite have things right, but I am really guessing at this point. Keep in mind that if you want to embed into the site you need a dedicated template as defined in the settings and you shouldn't need the if($page->protected) check. Does that help at all, or am I missing the point entirely?