Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

3 Neutral

About joeck

  • Rank
    Jr. Member

Recent Profile Visitors

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

  1. 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 !
  2. very fair point, just updated my post
  3. 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?
  4. 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
  5. 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
  6. Just saw this post: making my question an ugly duplicate. Please consider this topic as closed because of duplicate.
  7. 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...
  8. 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!
  9. 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
  10. @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
  11. 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!
  12. 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
  13. 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
  14. 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
  15. 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
  • Create New...