Jump to content

joeck

Members
  • Content Count

    28
  • Joined

  • Last visited

Community Reputation

4 Neutral

About joeck

  • Rank
    Jr. Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 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.
  2. 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.
  3. 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)
  4. 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.
  5. 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
  6. 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?
  7. 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
  8. 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 !
  9. very fair point, just updated my post
  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!
×
×
  • Create New...