-
Posts
11,185 -
Joined
-
Last visited
-
Days Won
372
Everything posted by adrian
-
I suppose the names/labels option should be configurable. I am low on time at the moment - any chance you feel like putting tother a PR to add that and throw in that new top margin hack as well?
-
@a-ok - this stuff has always frustrated me - it seems like it's only possible to add classes to an InputfieldWrapper when it's added to a form (which I do in the AdminActions module). I can't get the same code to work for this module. How about I add this: $inputfields = new InputfieldWrapper(); $margin = $this->wire('modules')->get("InputfieldMarkup"); $margin->value = '<div class="uk-margin-small-top"></div>'; $inputfields->add($margin); as a hack to get some space between the Add Row button and the Import/Export CSV section?
-
Do you have Tracy enabled for inside modals, panels, iframes? There is a config setting for disabling it in those to make things cleaner, but in most cases you probably want them on.
-
That's when it's time to turn on the Dumps Recorder panel ?
-
$testpage = $pages->get(1252); $tespage->of(false); $testpage->designers->add(1200); $testpage->save('designers');
-
Hey @bernhard - nice work! Yes, the API Explorer does, eg: The "params" is what you're looking for. Those wrapped in <em></em> are optional. Now the catch is that I include the params key for the API explorer, but for the hook data for the Captain Hook panel, I am storing like this: which means you can't easily get those params/arguments as easily. I was going to suggest you could use the API Explorer data instead, but there are several hooks, eg $page->viewable which don't show up as hookable in the APIExplorer because of the way they are added in the PW core, which is partly why the Captain Hook panel uses different methods to get the PW core methods. So, I have played around with adding these to the hooks API data: Would that work for your needs? I could make a method in the TracyPwApiData class hookable so that when it is called, your module could be triggered.
-
Not sure if this helps at all, but I just connected via VPN (Windscribe) through a German IP (185.189.112.92) and everything is loading fine.
-
Page reference field for user roles permission problem
adrian replied to pwfans's topic in General Support
Frustrating that we are still dealing with this 2 years later, but this is what I am currently using (thanks to @Robin S? // hack to overcome this: https://github.com/processwire/processwire-issues/issues/550 // from: https://processwire.com/talk/topic/19913-solved-page-reference-field-unpublished-pages-not-visible-by-non-superuser-rolesusers/?do=findComment&comment=172593 $this->wire()->addHookAfter('ProcessPageSearch::findReady', function(HookEvent $event) { $selector = $event->arguments(0); if(strpos($selector, 'template=user') !== false && strpos($selector, 'name|first_name|last_name%=') !== false) { $selector .= ', check_access=0'; } $event->return = $selector; }); -
Use the logout button on the user switcher panel and it should do what you want.
-
Comments not being approved and then being deleted
adrian replied to adrian's topic in General Support
Finally got back to investigating this. In case anyone else comes across this, it's due to the ukComment* methods that come with the PW "Regular" profile. The approval process when clicking the "Approve" link in the notification email doesn't work at all.- 1 reply
-
- 2
-
-
Thanks @dynweb - for some reason I hadn't noticed that. I have committed your fix. Thanks again.
-
module Recurme – Processwire Recurring Dates Field & Custom Calendar Module.
adrian replied to joshuag's topic in Modules/Plugins
For those who are interested, here is an explanation of why: https://www.php.net/manual/en/function.strtotime.php#92600 You need to add either the day or the year to the month to get it to work correctly. There are also some alternative fixes listed in this thread: https://stackoverflow.com/questions/3283550/convert-month-from-name-to-number -
module Recurme – Processwire Recurring Dates Field & Custom Calendar Module.
adrian replied to joshuag's topic in Modules/Plugins
Remember that version you are using not only has this fix, but lots of other changes for other bugs as well. Maybe it's time to post that version in its entirety somewhere - obviously with no support or warranty, but perhaps a repo that others could issue PRs against? Then again, I honestly think the entire storage and retrieval side of this module needs to be rebuilt from scratch. the inputfield is really pretty nice, but the rest is unfortunately very cumbersome and buggy. Of course, this is not an easy thing to get right, so I am not meaning to be too critical ? -
@Zeka - sorry, I am not sure - that Performance panel is not my own work - it comes from https://github.com/Zarganwar/PerformancePanel although it hasn't seen any updates in a long time. It would be great if you could figure out where the problem is coming from though if you have the time. @bernhard - thanks for the idea - but sounds like it's a no go afterall.
-
Hi everyone, Having some weird stuff going on with comments - I think it's a new bug but would love someone to check for me to see if it's also happening elsewhere before I file a bug report. If I click the Approve link in the email notifying me of a new comment that needs approval, it looks like it has worked, but then when I visit the comments admin interface, it us still listed as Pending. Also, recently it seems, comments are just vanishing - their entries are missing from the database completely. Problems seems to exist from 3.0151 to 3.0153, but maybe earlier as well. Thanks for taking a look!
-
Love it ?
-
Please help! Error in production environment only!
adrian replied to J_Szwarga's topic in General Support
Don't forget that Tracy's Module Disabler panel can quickly disable all autoload modules and includes a restore feature if those changes break things. -
-
My best guess is that it's an htaccess issue - most likely an AllowOverride setting that isn't letting mod_rewrite kick in as needed. If you're not familiar with these settings in Plesk, it might be best to submit a support ticket. First thing I would try is to add some gibberish text to the top of the PW root .htaccess file to see if it's being loaded and go from there.
-
Don't forget Tracy's Captain Hook panel ?
-
The way other is to simply change the name of the page to match the ID is a hook in your ready.php // rename page to match its page ID $this->wire()->addHookAfter('Pages::added', function($event) { $p = $event->arguments[0]; if($p->template != 'basic-page') return; $p->setAndSave('name', $p->id); }); One thing to note in your module - you are hooking on "save", so it will rename it every time it is saved. If you need the other functionality of your module, perhaps you can change to Pages::added ?
-
Selecting a iframe inside a textarea field
adrian replied to AndréPortuga's topic in General Support
Then try the Hanna code approach and set up attributes for the video ID, and max width / height and wrap the iframe in a container. Google embed video responsively and you'll get tutorials on how the wrapping works. You might end up with a shortcode format like this that lets you insert that into the RTE with the video ID and a max width and the Hanna code takes care of inserting these into the wrapper and iframe HTML. [[video_embed id="" width="500"]]