Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by joeck

  1. I'm having the same issue. Is the solution from @DaveP still the recommended way? Edit: it is working for me like Tom (OP) posted, I was missing a comma in the selector.
  2. update: If I remove the pageSelect field from the registration form the error no longer shows but the registration process is still not working (not sure why) The problem seems to be on the registration form only. Profile edit works just fine with the pageSelect field.
  3. I removed the hook but error message still shows. I don't have any setup with nginx or other framework (apart from jQuery but I assume that is not considered weird, nor a framework) Tracy is on version 4.19.13 and apparently up-to-date. No recent tracy logs I haven't found any serialize() in my code and I'm pretty sure I didn't use it since this is the first time I hear about this function, let alone knowing what it does.
  4. yes I have a hook in ready.php that should only apply on a different PageSelect field called team_owner: $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->hasField == 'team_owner' && !$this->wire('user')->isSuperUser()) { $permissions = $this->wire('user')->getPermissions(); $authorized_pages = new PageArray(); foreach($permissions as $permission){ if (!$permission->team_owner) { continue; } //skip permissions without team foreach($event->pages->find("template=team") as $page){ if ($page === $permission->team_owner){ $authorized_pages->add($page); } } } $event->return = $authorized_pages; } }); I think this is working as desired, since I see all the options in the dropdown of the registration form field (called team_reference) and if the hook would execute I shouldn't see all the fields in the dropdown. these modules are installled: AdminOnSteroids FieldtypeColorPicker InputfieldCKEditor LoginRegister PageEditFieldPermission TracyDebugger fullcalender.io (not a processwire module)
  5. oh boy, turns out that my css library materialize.css sets all the select inputs to display: none 💩 The select has all the desired data simply not visible due to css... But now i get another error when trying to register with a new account: Fatal error: Uncaught Exception: Serialization of 'Closure' is not allowed in [no active file]:0 Stack trace: #0 {main} thrown in [no active file] on line 0 Again no logs in Processwire admin or browser console. The registration email actually gets sent out but when you click the link you receive the error message: Unable to complete confirmation, please re-register and try again.
  6. First of all, thank you so much for your reply @wbmnfktr I guess this means I broke something... I'll try on a fresh installation. What confuses me is that I don't get any errror, warnings or notices in any logs
  7. Hi there, I'm trying to have a PageReference (single) Select field in the registration form and profile page of the user. I'm trying to achieve this with the module LoginRegister: https://modules.processwire.com/modules/login-register/ I simply added the desired field (team) to the user template and then added the field to the field selection in the module configuration. but the select doesn't render properly (see image attached). I'm assuming the reason is because the PageSelect field isn't text-based: I tried to add the InputFieldPage field to the form manually but only got the error that the field needs to be configured. Even with this blog or this one: I wasn't able to get the Select displaying correctly. This is a very strange and new feeling for me: searching a functionality in Processwire for more than a day and not being able to find a very easy and smart solution. Can someone point me into the right direction?
  8. Hi everyone, I'm trying to have a page reference field on the registration and profile edit page. I know that only 'standard' fields are supported but I'm not sure whether the page reference field is 'standard' or not. Currently it is not rendered correctly, I don't see the select dropdown to select a page (see image) Has anyone done this before? Or can point me into the right direction? I'm trying to add the InputfieldPage manually but I wasn't able to find API for a page reference field. Thanks, Joeck
  9. I never thought about that and the website is actually hosted on a Windows (IIS) server which might be an issue. However, the CRLF/LF doesn't seem to change any of the output. Actually, I just tested the exact same code on a UNIX apache server and there it is formatted as expected. So there must be something related to the IIS server. I'll contact the hosting support. Thanks a lot for the link, looks very very interesting, I'll try this for my next project. I was already amazed by the flexibility of Processwire and I didn't even know about this way. This just puts flexibility on another level. Processwire never fails to impress me. Thanks a lot for your help @szabesz !
  10. Hi there, I'm currently using the direct output method for my templates where the prependTemplateFile is my header & navigation and my appendTemplateFile is the footer of the website. In addition to that, I include other commonly shared files into the templates via "include_once('file.php')". The navigation file that gets appended to every template: <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> <div class="container"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header sc-content"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="<?php echo $pages->get(1)->url; ?>"><img src="<?php echo $config->urls->templates?>/images/titlebar.png"></a> <!-- link zu Startseite (id=1) mit bild f�r navigationsleiste --> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse sc-content" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav navbar-right"> <!-- In Mobile ansicht (xs) anzeigen wegen Anordnung. --> <li class="visible-xs"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><img src="<?php echo $user->language->image->first->url; ?>" alt="<?php echo $user->language->title; ?>"> <b class="caret"></b></a> <ul class="dropdown-menu"> <?php // remember what language is set to $savedLanguage = $user->language; foreach($languages as $language) { //alle sprachen durchgehen // if user is already viewing the page in this language, skip it if($language->id == $savedLanguage->id) continue; // if this page isn't viewable (active) for the language, skip it if(!$page->viewable($language)) continue; // set the user's language, so that the $page->url and any other // fields we access from it will be reflective of the $language $user->language = $language; // output a link to this page in the other language $path = $language->image->first->url; echo "<li><a href='$page->url' alt='$language->title'><img src='$path' alt='Flagge von Sprache'> $language->title</a></li>"; } // restore the original language setting $user->language = $savedLanguage; ?> </ul> </li> <!-- Telefon mit link zu kontakt in mobile ansicht verborgen --> <li class="hidden-xs"> <a href="<?php echo $pages->get(1022)->url; ?>">Tel: xxxxxxxx</a> </li> <!-- Telefon mit link um anzurufen in mobile ansicht sichtbar --> <li class="visible-xs"> <a href="tel:+41-44-233-30-30">Tel: xxxxxxxx</a> </li> <li class="visible-xs"> <a href="<?php echo $pages->get(1)->url; ?>"> <span class='glyphicon <?php echo $pages->get(1)->glyphicon; ?>' aria-hidden='true'></span> <?php echo $pages->get(1)->title; ?> </a> </li> <!-- Ausgabe aller Seiten f�r Mobileansicht (visible-xs) --> <?php foreach ($pages->get(1)->children as $navitem) { echo "<li class='visible-xs'> <a href='$navitem->url'> <span class='glyphicon $navitem->glyphicon' aria-hidden='true'></span> $navitem->title </a> </li>"; } ?> </ul> <!-- navbar-nav --> </div> <!-- /.navbar-collapse --> </div> <!-- /.container --> </nav> The template file and the appended footer file are very similar in terms of format and coding style. Now the final output/source of the website is not formatted at all, not even all the linebreaks. I tried to include the formats in the echos and use as much HTML as possible (like thomas descirbed above) but I feel like the prepend/append and included files mess up/ignore the format: <!DOCTYPE html><html lang="de"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"><meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><meta http-equiv="content-language" content="de" /><link rel="stylesheet" href="/site/assets/aiom/css_fcf3e08b16c1fb16f6f309285c212e13.css"><link rel="shortcut icon" type="image/png" href="/site/assets/files/1062/favicon.png"/><!--[if lt IE 9]><script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script><script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script><![endif]--> [..] </head><body><nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"><div class="container"><div class="navbar-header sc-content"><button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button><a class="navbar-brand" href="/"><img src="/site/templates//images/titlebar.png"></a></div><div class="collapse navbar-collapse sc-content" id="bs-example-navbar-collapse-1"><ul class="nav navbar-nav navbar-right"><li class="visible-xs"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><img src="/site/assets/files/1017/germany-v1.png" alt="Deutsch"><b class="caret"></b></a><ul class="dropdown-menu"><li><a href='/en/' alt='English'><img src='/site/assets/files/1019/english-v1.png' alt='Flagge von Sprache'> English</a></li><li><a href='/fr/' alt='Francais'><img src='/site/assets/files/1020/french-v1.png' alt='Flagge von Sprache'> Francais</a></li></ul></li><li class="hidden-xs"><a href="/kontakt/">Tel: xxxxxxx</a></li><li class="visible-xs"><a href="tel:xxxx">Tel: xxxx</a></li><li class="visible-xs"><a href="/"><span class='glyphicon glyphicon-home' aria-hidden='true'></span> xxxx </a></li><li class='visible-xs'><a href='/standort/'><span class='glyphicon glyphicon-map-marker' aria-hidden='true'></span> Standort - so finden Sie uns </a></li><li class='visible-xs'><a href='/kontakt/'><span class='glyphicon glyphicon-earphone' aria-hidden='true'></span> Kontaktinformation </a></li><li class='visible-xs'><a href='/angebot/'><span class='glyphicon glyphicon-apple' aria-hidden='true'></span> Unser Angebot </a></li><li class='visible-xs'><a href='/konzept/'><span class='glyphicon glyphicon-file' aria-hidden='true'></span> Unser Konzept </a></li><li class='visible-xs'><a href='/team/'><span class='glyphicon glyphicon-user' aria-hidden='true'></span> Das xxxx-Team </a></li><li class='visible-xs'><a href='/links/'><span class='glyphicon glyphicon-globe' aria-hidden='true'></span> Links </a></li><li class="hidden-xs"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><img src="/site/assets/files/1017/germany-v1.png" alt="Deutsch"><b class="caret"></b></a><ul class="dropdown-menu"><li><a href='/en/' alt='English'><img src='/site/assets/files/1019/english-v1.png' alt='Flagge von Sprache'> English</a></li><li><a href='/fr/' alt='Francais'><img src='/site/assets/files/1020/french-v1.png' alt='Flagge von Sprache'> Francais</a></li></ul></li></ul></div></div></nav> Is there a way to keep the format of the files included and or prepended/appended? or what am I doing wrong?
  11. Resolved the issue by myself: Works perfectly fine! In case somebody else lands here: double check the connection & credentials to the database in your config.php file
  12. Hi there, I'm trying to have a multi-site (multiple databases) setup on a IIS (Microsoft) server. I know that IIS is not officially supported by ProcessWire but customer is insisting on IIS. I get an 500 Error when trying to access the sub-domain/other processwire site. Did somebody do this before or is it not possible at all to have a multi-site setup on IIS? Thanks
  13. Just saw this post: making my question an ugly duplicate. Please consider this topic as closed because of duplicate.
  14. Hi Everyone, I was playing around with the ProcessWire command-line script sitemap.sh (https://processwire.com/docs/front-end/include/) I currently have a multi-site setup (with separate databases). -> site -> site-other The sitemap works but it shows only the pages from the default site directory. How can I get the sitemap of the site-other directory? Here is my working code that prints the sitemap of 'site': #!/usr/bin/php <?php namespace ProcessWire; include("index.php"); // bootstrap ProcessWire function listPage($page, $level = 0) { echo str_repeat(" ", $level) . $page->title . "\n"; foreach($page->children as $child) { listPage($child, $level+1); } } listPage($pages->get("/")); // start at homepage I tried including index.config.php instead of index.php but that didn't help...
  15. Oh wow, Thank you so much @elabx I could have come up with that myself. Sometimes you don't think of the easiest solution. Thanks for giving me a heads up! You have a great day!
  16. Hi everyone, I read a few things about implementing a multi-language feature of this module but I can't find anything in the module. Has anyone managed to do a multi-language setup with SEO? Also the meta tags are in the source file but Google doesn't use them. Same issue as @Roych
  17. @Tobi C. I had the same issue. After I checked the "Revoke Authentication" button in the settings of the GA-Module I finally saw the drop-down with the domains and everything is working now. Not sure what caused the problem...but hey it's working now. Awesome module @Wanze and greetings from Switzerland
  18. Thank you for your help! It works now using the web.config file from @matjazp in his post. special thanks to @kongondo for linking me to the correct topics It really is true: PW has a great, friendly and extremely helpful community!
  19. I get the exact same error (404 on subpages, index.php is working) The rules added from the support are not helping me (for the migration) in any way, they simply prove that the htacces file is working/read (somehow). To be specific: the rules are regarding the old site and simply rewrite a not existing url to an existing url */test.html to */angebot.html (from the old website/structure). But the new website built with PW has a different (more organised) structure. I hope my explanation is not too confusing
  20. The $config->httpHosts is set to the root of the customers website (with and without www.*) The logs I found do not state a request to the htaccess file... and I still don't get an error with 'asölkdfjasldfj' on first line... As if the server doesn't even care... :-( In the attachement you find logs with both version of the htaccess file (with and without the 'laksjdföadsf' error) log.txt
  21. It is in the root directory No, I'm awaiting an answer from support. But I think it is configured, as the rewrite rules are working (see attachement). $config->debug is set to true, but this is not helping as the server is displaying its own 404 Error page, hence I do not see if the config is still pointing to localhost. I tried to change the servers 404 error page to the /index.php (as in the htaccess file) but this just gave me the index.php page, no matter which link is clicked. PS: the CSS and some modules CSS are not linked properly as well, maybe this helps in finding the error .htaccess.txt
  22. Hi Guys, I'm trying to do my first migration to the customers existing server (IIS 10) . I ran the site as a subdirectory on my website for test purposes (everything works fine). Following the tutorial of Joss, I tryed the site on a local xampp server to make sure, it also works on a root directory. So far so good, everything works. Now I moved the files (from the xampp) to the customers server. The root/index page is shown but for every subpage i get 404 Errors... Hence I followed the troubleshooting guide for not working URLs: On the first sight, the .htaccess file is not recognized, therefore I contacted the host support. They said, it is recognized but not all modules are supported in the processwire .htaccess file. I did the "öalskjfdoal" test in the .htaccess file and didn't get a 500 Error.... BUT the rewrite rule from the hosts support, to proof the file is read, DID work... The support claims, they do not provide debugging... so basically the .htaccess file is recognized and working, but not throwing any errors (for whatever reason). Working rewrite rule (from support): RewriteEngine On RewriteBase / RewriteRule ^test\.asp$ index.html [NC,L] RewriteRule ^test\.html$ konzept.html [NC,L] RewriteRule ^test2\.html$ team.html [NC,L] The support said, a couple modules are not supported in the htaccess file, the supported ones are listed here: http://www.helicontech.com/ape/ (I think mod_rewrite is supported) As I do not completely understand what exactly is happening in the htaccess file, I'm stuck. I tried all suggestions I found regarding this topic on the forum, but none of them solved the problem. .htaccess.txt
  23. thank you as well, in the end its the same as Zeka said. Thank you!
  24. well, thank you very much! Now works perfectly fine. I don't know how to close/mark "solved" this topic, if somebody could explain it to me, I could close it.
  • Create New...