Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by tires

  1. I would suggest to use this very nice admin theme as default for processwire. It looks much more professional and cleaner even if maybe a few ui optimizations would be necessary.
  2. Thanks for the info! Is there a quick workarcoud to fix it on my own. Or do i need to downgrade to an older php? ---------------------------------------------------- For now i just hide the error / warnings with this code in my site/config.php /** OWN ERROR HANDLER FOR DEPRECATION NOTES **********************************************/ function myLocalDevDeprecationErrorHandler($errno, $errstr, $errfile, $errline) { if(!isset($GLOBALS['DEPRECATION_WARNINGS_BAG'])) { $GLOBALS['DEPRECATION_WARNINGS_BAG'] = []; } if(!is_array($GLOBALS['DEPRECATION_WARNINGS_BAG'])) { $GLOBALS['DEPRECATION_WARNINGS_BAG'] = []; } $GLOBALS['DEPRECATION_WARNINGS_BAG'][] = [$errfile, $errline, $errstr]; return true; // true | false = suppress further processing } /** OWN ERROR HANDLER FOR DEPRECATION NOTES **********************************************/ See here:
  3. Under PHP 8.1 i got this error message: Warning: Undefined array key "canonical" in .../site/assets/cache/FileCompiler/site/modules/MarkupSEO/MarkupSEO.module on line 357 Warning: Undefined array key "custom" in .../site/assets/cache/FileCompiler/site/modules/MarkupSEO/MarkupSEO.module on line 401 Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in .../site/assets/cache/FileCompiler/site/modules/MarkupSEO/MarkupSEO.module on line 580 Warning: Undefined array key "canonical" in .../site/assets/cache/FileCompiler/site/modules/MarkupSEO/MarkupSEO.module on line 357 Is there an updated version?
  4. Now I run into another problem. I would like to use the redirect in a website where i use the login/register module. According to my devtools in firefox the initially URL (https://mysite.com/article/name-of-my-article/) is redirected to the frontend login form (https://mysite.com/) with a 301. I have no idea how to write the hook to grab the URL and set the cookie. In this hook i don't work: $this->addHookBefore('ProcessLogin::buildLoginForm', function(HookEvent $event) ...
  5. As i mentioned before i didn't get any result in my hook if i try it with segments. Or is there something wrong?
  6. You are absolutely right! But the GET variable is not absolutely necessary if i understand it right. Is there any way to get the last part of the URL via segments instead of this wild explode('/' ... Or can i not use segments in this context?
  7. Many thanks to all of you! I thought it would be useful to use the processwire functions (i.e. segments) and I did not want to change the url. Because if someone kicks on the link in the mail and is already logged in the url would have to be changed again ... from the url with get to the regular one.
  8. Many thanks to both of you! I solved it this way and put the following hooks in my site/ready.php ... First hook to grab the URL: $this->addHookBefore('ProcessLogin::buildLoginForm', function(HookEvent $event) { // --- Split URL --- // $actual_link = explode('/',(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"); // --- Putting the last i.e. fifth part of the URL in a session cookie "weiterleiter" --- // $this->wire('session')->set('weiterleiter', $actual_link[5]); }); Second hook to redirect after login: $this->addHookAfter('Session::loginSuccess', null, function($event) { // --- Get session cookie "weiterleiter" and write it in $weiter --- // $weiter = $this->wire('session')->get('weiterleiter'); // --- If the $weiter is not empty add the path and write it in $url --- // if(!empty($weiter)) $url = "artikel/".$weiter; // --- Redirect to the URL --- // $this->wire('session')->redirect($url); // --- Delete the session-Cookie ---// $this->wire('session')->remove('weiterleiter'); }); That works for me! Is there a smarter way to do this? Or a smarter way to get the url by segments?
  9. To allow the user to check the box, I need to give the role permission to view and edit the field. I also apparently need to give the role page editing permission ...
  10. Thank you! While trying to implement your solution I found an even easier way. I restricted the access in the field settings to specific roles. This works pretty well!
  11. HI! I would like to show some fields (checkboxes) in the user profile depending on the role of the user. I.e. If the user has the role "checker 1" the first check box i shown when he is editing his profile. If the user has the role "checker 2" the second check box i shown in his profile. BTW. I am using the LoginRegister module for users to edit they profile if this makes a difference.
  12. It would be a pity if the module was not continued! I'm afraid I can't contribute in any helpful way. Unfortunately i lack the skills ...
  13. By visiting the hash URL to checking the mail manually i get the following error message: Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in /mydomain/mysite/site/modules/ProcessEmailToPage/flourishlib/fMailbox.php on line 505 How can i avoid this?
  14. Ok, i find it out: If i add "$config->pagefileSecure = true;" to my site/config.php all files are secure immediately! I does't have to do any further steps to secure old files.
  15. After a few month walk by i just want to ask again: Is there a way to change existing files into secure files? If i understand this right after i add the $config->pagefileSecure = true to my config file all files from now on are secure ... but not the old ones, right?
  16. Check this: in the .htaccess the "RewriteBase" ... should be "/" in site/config.php the $config->httpHosts entries ... is the url entered correctly in site/config.php set the $config->debug to "true" to get further error messages
  17. Thanks! Do you have any idea how to avoid a GET var and just work with the normal URL? And where to grab this URL so i could redirect after login? Do i need another hook for this purpose? This test hook doesn't output a segment at all: $this->addHookBefore('ProcessLogin::buildLoginForm', function(HookEvent $event) { $segment = $this->wire('input')->urlSegment1(); echo "This is my" . $segment; });
  18. Hi! I made a little intranet with processwire. If there is a new article a mail containing the URL (https://mysite.com/article/name-of-my-article/) is sended to each user. If the user klicks on the url and he is not already logged in he is now redirected to the login page (in this case a frontend login with Login/Register module). After login he is redirected to the start page but not to the URL from the mail. What is the most simple way to get a proper redirect to the expected URL? Do i have to work with a cookie? Where do i have to write and read this cookie? Thanks!
  19. Hi! I try to add one of my lister bookmarks to the main navigation in the backend. Is there a simple way to do it? And my second question: is there a way to render the bookmarked pages in frontend? May i use a bookmark as a select for pages->find? Thanks!
  20. Thanks! The RestrictTabView module seems to be a good way. Do you have a sample code for a hook to hide the crop / focus etc.?
  21. Hello! I wonder if i can create a minimalist backend for some user groups. They don't have to see the unpublish and hide option in the page tree, neither the page settings tab. For image fields the crop, focus etc. options as well as the actions are not necessary ... Is there an easy way to achieve this? Or a module? Cheers and thanks!
  22. If i undertand it correct you just need: $herstellerfilter="manufactor='Hersteller abc'"; $pages->find("template.name=produkt, parent.name=meine_produkte, $herstellerfilter");
  23. Hello! Is there a way to output a notification if the forgot password verification code is expired and the user is redirected to the login form therefore. At the moment there is just the redirect (after 60 minute run off) to the login form which could be a bit confusing for the user. The login form currently looks like this: $loginRegister = $modules->get('LoginRegister'); echo $loginRegister->execute(); Cheers and thanks!
  24. Thanks for your answers! I think this was because of some smpt limits at the provider. I now solved it with wiremail without smtp an it work pretty well.
  25. Thanks for your answer! May be its blocked. But where? At the user or on the server? Or is it the bcc?
  • Create New...