-
Posts
10,902 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
I think that is actually the approach I've used in the past as well!
-
The API for this is kinda ugly but it works. Where "3" is the number (in order) of the subfield / column you are looking for.
-
[SOLVED] Hook not working inside module
adrian replied to jploch's topic in Module/Plugin Development
I think it might be because you are extending InputfieldPageTable rather than Wire or WireData. Sorry, I have to run now, but maybe that will get you on the right track. Usually with a custom inputfield you just need a css file named to match the class of the module and it will be automatically loaded, eg InputfieldPageTableExtendedGrid.css -
[SOLVED] Hook not working inside module
adrian replied to jploch's topic in Module/Plugin Development
What I posted above should allow you to do that. Did you try? -
[SOLVED] Hook not working inside module
adrian replied to jploch's topic in Module/Plugin Development
Try this: $this->wire()->addHook('ProcessWire::ready', function($event) { $event->page->addHookAfter('render', function($event) { $value = $event->return; // Return Content $style = "<style type='text/css'>". $this->pages->get((int) wire('input')->get('id'))->style ."</style>"; // Add Style inside bottom head $event->return = str_replace("</head>", "\n\t$style</head>", $value); // Return All Changes }); }); inside your module's init() method. -
@bernhard - good idea. Fixed in the latest version.
-
Is it a publicly available module? If so, it would be good to know which one.
-
How can you move on at the moment - I thought your sites were still broken?
-
Local dev is 161 (actually just updated to today's commits). At the moment, the live sites vary between 156 and 160.
-
What I can't fathom is that you uninstalled Tracy and it's still a problem. It suggests to me that it's not Tracy related. I am running the latest version on several different sites and different servers without any problems. This sounds like the likely issue - I know you said you put the old versions of the templates back and they are still broken, but with Tracy uninstalled and its folder removed, it can't be impacting things anymore. Any chance you accidentally messed with the htaccess file?
-
Trying to convert to markup regions - blank output NOT Tracy
adrian replied to gornycreative's topic in General Support
I've replied on your other post about this - please try to keep things in one place ? -
Hi @gornycreative - sorry you're have a rough time with this. Did you properly uninstall 4.21.19, or did you just remove the files? I know you said you aren't getting any errors, but are you talking about PHP errors only? Does the browser dev console show any JS errors? What about errors in the apache logs? Have you done a modules refresh and clear session & cookies from the Processwire Info panel in Tracy? Do the sites work in a different browser / incognito window?
-
Is it only when using field templates, or is the trimming happening on a textarea field and as such would happen even if you output it directly? If so, take a look at this issue (https://github.com/processwire/processwire-issues/issues/459) and the noTrim option.
-
Best practise for setting up another user's 2FA?
adrian replied to JayGee's topic in General Support
Not certain, but it sounds like it hasn't made it in yet - sorry, I forgot that feature wasn't in yet. -
Best practise for setting up another user's 2FA?
adrian replied to JayGee's topic in General Support
You create the user and then follow the instructions in this post https://processwire.com/blog/posts/pw-3.0.159/ which explains how to force the user to set up 2FA themselves. -
That is how the PW is supposed to work already - just unfortunately with the new(ish) uikit theme, it doesn't always work as expected: https://github.com/processwire/processwire-issues/issues/480 The percentage based option may or may not fix it for you.
-
Hi @AndZyk - please try the latest version just committed.
-
In my humble opinion, that module is too broken to use and hasn't seen any updates since 2017 ? Either use the new Pro version, or code something from scratch yourself.
-
Hi @MoritzLost - what version of Tracy are you running? Trying to figure out what is on line 409 as highlighted in the call stack. It doesn't seem to me like it's the latest version, but I could be wrong. What changed that started the error? Did you update something?
-
Hi @maddmac - no, there isn't a lost password option. I'm not sure what it would take to implement the PW core version into this. I am super busy with client work for the next month so can't really tackle this at the moment I'm afraid. If you feel like having a go, I am happy for PRs ?
-
Honestly not sure - maybe the permissions on that file got messed up? I expect it was something locally specific.
-
Thanks @teppo - I actually noticed there was a new version the other day and used the PW Upgrades module to update, but for some reason it's not actually updating the module (I just tried again) - I assumed it had worked. Anyway, I manually updated to 2.1.0 and you're correct of course - it seems like they have been fixed.
-
Actually, I think it needs to be: $this->destroyLogins($this->wire('user')->id); because I am getting this error: HP Notice: Object of class ProcessWire\User could not be converted to int in /var/www/html/site/assets/cache/FileCompiler/site/modules/LoginPersist/LoginPersist.module:400
-
Also a bug: $this->destroyLogins($user); needs to be: $this->destroyLogins($this->wire('user'));