Jump to content

derelektrischemoench

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by derelektrischemoench

  1. Hey guys, I know this thread is somewhat dated; the host of a customer of mine just notified me they will be upgrading all their db servers to MySql 8 by the end of the month. Are there any new experiences on whether these updates will break my sites? The processwire instances I host on this server are v.3.0.165. So I'm kinda curious to know if anyone has had experiences with this combo. I guess eventually I'm going to try this out on my dev machine when I find the spare time to update my MySQL-Server to v8. Greetings, derelektrischemoench
  2. Hi @dragan, I've tried everything you mentioned, none of it worked / led to any clue as to what the problem might be. My error logs are empty / don't show any error; I already have setup a vhost, checked my hosts file, changed my hosts file, changed my vhost, my apache configs are identical... I have no clue as to what could be the problem. I might try to install tracy debugger, although I'm not quite sure as how to achieve this, since I can't access the backend and I don't have composer running. But I'm guessing that this can be done via the api. Anyhow, if anyone has further ideas, please let me know; @dragan: thanks so far. Greetings derelektrischemoench
  3. Hi @Gideon So, the website is currently hosted on three separate machines; one staging / preview system which is accessible over the internet on a shared hosting space with strato; a large german hosting provider, also I have setup my two main dev machines which are my PC and my laptop, both running ubuntu 19.10 with apache 2.4.41 and Mariadb 10.3.20. My hoster on the other hand uses mysql 5.6.42 which I can't influence or change.
  4. Hi @Gideon So thanks for your input. I've tried modifying the session fingerprint values, but that didn't solve the issue for me. Does anyone else have any ideas? Greetings derelektrischemoench
  5. Hi guys, I'm facing a somewhat strange issue here which I can't quite wrap my head around. I have a PW site in development which runs on three machines simultaneously, one staging server which is accessible as a preview instance for my customer, my PC and my laptop. I have three completely identical settings on each of the three machines (same apache version, same php version, same codebase, same database); however on my PC I am unable to log into the backend. I get no error message or anything, when I try to login; i just get redirected to the login page. I have already enabled database driven sessions (I enabled them on my laptop, then I dumped the database and copied it to my pc); I have cleared the cache directory; I cleared the sessions in the database; I cleared my browser caches, I tried different browsers, all to no avail; I am unable to login when using my pc, the instances all have the same .htaccess. Is there something I'm missing here or does anyone have a clue as to what my issue here might be? I'm using processwire 3.0.123 Thanks for any input, greetings derelektrischemoench //edit: I've noticed something interesting; despite the directories of my web folders being the same layout; when I open the admin page i get a 404 on the processwire/ resource in the networks panel of chrome; on my laptop I get a 200.... I guess this is where my problem is; but why?
  6. Hi guys, I'm facing a somewhat strange issue here which I can't quite wrap my head around. I have a PW site in development which runs on three machines simultaneously, one staging server which is accessible as a preview instance for my customer, my PC and my laptop. I have three completely identical settings on each of the three machines (same apache version, same php version, same codebase, same database); however on my PC I am unable to log into the backend. I get no error message or anything, when I try to login; i just get redirected to the login page. I have already enabled database driven sessions (I enabled them on my laptop, then I dumped the database and copied it to my pc); I have cleared the cache directory; I cleared the sessions in the database; I cleared my browser caches, I tried different browsers, all to no avail; I am unable to login when using my pc, the instances all have the same .htaccess. Is there something I'm missing here or does anyone have a clue as to what my issue here might be? I'm using processwire 3.0.123 Thanks for any input, greetings derelektrischemoench
  7. Hi Kongondo, thanks for including my input and change requests :) very cool! I'm gonna give it a try, asap. Greetings derelektrischemoench
  8. Hi guys, hi @kongondo, I have a menu which I built using your code from some pages back: which works fine, although I have a question regarding the submenus. I have selected to include all native descendants of my page into the submenu. which generates something like this: <ul> <li> Projects </li> <ul class="submenu"> <li class="submenuItem"> Project 1 </li> <li class="submenuItem"> Project 2 </li> ... -> render all remaining Project objects which are children of the Projects Page </ul> This, however, bloats my submenu, if I have a lot of projects. Is there some option to limit the amount of projects that are rendered, to e.g. 10 and then provide a link as the last project item which leads to a project list view which displays all projects? I just don't quite get the code; e.g. where the code fetches the native descendants of the ``projects`` page. Any help would be appreciated. Greetings, derelektrischemoench
  9. Ugh I found the solution; turns out I'm just too stupid. I created the template in the admin but the template file was missing. Which of course returned a 404. Created the template; baaam. Everything works.
  10. Hi wbfmnfktr, thanks for your input. I tried activating the rewritebase as you suggested. Interestingly, when I activate rewriteBase / and rewriteBase/pw/ I get a 500 with and this apache2 error: AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://processwire.localhost/ If I only activate RewriteBase/ I get a 404. So I assume the 500 is preferable in this case, since it shows some kind of debug message, right? ?
  11. Hi guys, I'm facing a weird issue here. I cannot access any other page than / or /admin; whenever I try another page I get a 404. Interestingly though, I am able to get into the backend and edit my pages and whatnot without any problems. I'm using the standard htaccess bundled with processwire. Is there any solution to this? I have attached my htaccess below. Thanks in advance, best wishes derelektrischemoench
  12. So... just in case anyone is facing a similar issue, I found the solution to my problem. In my case it was due to mod_rewrite being somewhat borked. I reinstalled apache2 and activated mod_rewrite and voilà it worked.
  13. Good morning guys, I have a weird issue with Processwire 3.0.123. Whenever I try to edit my root page in the backend I get the "Bookmarks" section instead of the edit page view. (-> http://localhost/processwire/page/edit/bookmarks/) The link target of the root page in the backend, however is shown as: http://localhost/processwire/page/edit/?id=1 So there seems to be some redirect happening in between. Has anyone ever faced such an issue? Any help would be appreciated, since I basically can't edit my homepage. //edit: I thought about removing the bookmarks module since I don't need it, which should in theory help with the problem. I wasn't able to find bookmarks as a standalone plugin that can be deactivated. Is this possible? Greetings derelektrischemoench
  14. HI guys, I'm using twig for my frontend and I'm trying to pass $options to the menu for rendering. For some reason I can't achieve what I want, as I seem unable to pass associative arrays to the render() call in twig. I'm using markupMenuBuilder to render the menu. I generate it as follows: $menuBuilder = $modules->get('MarkupMenuBuilder'); $options = array( 'has_children_class' => 'has_children', 'current_class' => 'active', 'menu_css_id' => 'main', 'menu_css_class' => 'nav', ); $view->set('options', $options); $view->set('menuBuilder', $menuBuilder); to make menuBuilder accept the options I would have to pass them to the render function in php like this: echo $menu->render('sidenav', $options) I can't get this to work in twig since I don't get how to pass the options to the render function when using twig. Can anyone point me in the right direction plz? Best whishes deM
  15. Hi guys, I'm trying to resize images which I query through getRandom(). I can't seem to get it right though. What I have so far is: $randomImage = $pages->get($targetPageId)->images->getRandom() Which returns an image, albeit in original resolution. I assumed I should be able to call resize() on the image like so: $randomImage = $pages->get($targetPageId)->images->getRandom()->width(400) Which unfortunately gives me an exception. I assume this is because getRandom() might not return an image but something else(?). So how would I do this correctly? Greetings derelektrischemoench
  16. Hi Kongondo, thanks for the quick reply; I fixed my mistake by nesting the loops. I'm totally not used to php, which treats arrays very differently than other languages. What I ended up with was this: foreach ($menuItems as $item) { $targetPageId = $item['pages_id']; $randomImage = $pages->get($targetPageId)->images->getRandom(); $menuItemsRendered[] = array( 'page_id'=>$item['pages_id'], 'title'=>$item['title'], 'url'=>$item['url'], 'image'=>$randomImage ); } which works perfectly fine. Thx for the support.
  17. Hi guys, I'm struggling a little getting a menu rendered here. After having build the menu I want to manipulate it; I want to add all menu items to an array, grab an image from each of the target pages in the menu and then render each menu item with some pictures from its target page. I tried using getMenuItems() for this but somehow it fails, I probably don't really get how to properly use it. Here's what I have so far: $menuBuilder = $modules->get('MarkupMenuBuilder'); $menu = 'mainNav'; $menuItems = $menuBuilder->getMenuItems($menu, 2, $options); $bundledMenuItems = array(); $menuItemsWithPictures = array(); //build an array that holds the random picture for each category in the menu foreach ($menuItems as $menuItem) { $targetPage = $pages->get($menuItem->id); $menuItemsWithPictures['title'] = $targetPage->title; $menuItemsWithPictures['pictures'] = $targetPage->get('images'); //this array is intentional, I want to do some slideshow thingy there array_push($bundledMenuItems, $menuItemsWithPictures); } $view->set('menuItems', $menuItems); $view->set('bundledMenuItems', $bundledMenuItems); ?> (This code is probably highly questionable, I'm not really proficient in php; love ProcessWire but despise php...., but what the hell.) I can't, however, seem to render all the items with their corresponding pictures in the frontend. I'm using twig as a template engine; this is what var_dump returns in the frontend: pages: array(4) { [0]=> array(2) { ["title"]=> string(4) "Home" ["pictures"]=> object(ProcessWire\Pageimages)#235 (2) { ["count"]=> int(1) ["items"]=> array(1) { ["steinlampe_2_grayscale.png"]=> string(26) "steinlampe_2_grayscale.png" } } } [1]=> array(2) { ["title"]=> string(5) "Admin" ["pictures"]=> NULL } [2]=> array(2) { ["title"]=> NULL ["pictures"]=> NULL } [3]=> array(2) { ["title"]=> string(5) "Pages" ["pictures"]=> NULL } } ... which aren't the pages that I declared in the menu with menuBuilder. I there something I'm missing here? My desired menustructure should be: illustrationen leuchten impressum ... Does anyone have an idea what I got wrong here? Best regards, derelektrischemoench
  18. Thanks, that did the trick! Greetings, derelektrischemoench
  19. HI guys, I'm currently building a site which displays a selection of processwire pages in one frontend page. My Page tree looks something like this: flavors: a b c ... flavors is the page that gets rendered a, b, c... are child pages of this page. All of these pages contain an image field although some images are high res the other are low res. I added a checkbox field to select whether the image is high / lowres and i want to render them conditionally based on this checkbox value. I have troubles separating these pages though as I seem to be unable to query whether the high res checkbox is set. I'm using the twig template engine to render the frontend. My page selection looks something like this: $available_flavors = $pages->get(1017)->children(); $available_flavors_high_res = $pages->get(1017)->children('is_high_res_image=1'); In my frontend I render the values like that: <div class="row"> {% for flavor in available_flavors_high_res %} <div class="col-sm d-flex flex-column"> <div class="shishaFlavor align-self-center" style="background-image: url('{{ flavor.shisha_flavor_image.url }}')"> </div> <h3>{{ flavor.title }}</h3> </div> {% endfor %} </div> <div class="row"> {% for flavor in available_flavors_low_res %} <div class="col-6 col-sm-4 col-md-3 col-lg-2 d-flex flex-column"> <div class="shishaFlavor align-self-center smallImage" style="background-image: url('{{ flavor.shisha_flavor_image.url }}')"> </div> <h5>{{ flavor.title }}</h5> </div> {% endfor %} </div> The check whether the the high_res value is set, however gets ignored. I assume this has to do something with the way I select the child pages in the PHP snipptet above. Could someone point me in the right direction on how to correctly separate the images with the high-res- flag from the ones without? I guess this would boil down to correctly selecting the boolean. Thanks in advance, derelektrischemoench
  20. AAAAAWWW YEEEEA!. Thx... Don't know why I didn't think about that possibility myself. I only tried google cache but something was borked there. Anyways, thanks again and good luck getting your website stuff going ;-) Greetings DeM
  21. Oh yea, one other thing..... I tried rendering truncated posts on my front page, which worked fine. When I click on "Show more" on the truncated posts, I would expect the module to show me the full post and render the comments section etc. Well.... the rendering of the comments etc. works but the post remains truncated, though. It also outputs the "show more" link but when I click that, nothing happens. I use the "blog post" template to show individual posts, but I was unable to find a function that shows me the post in full..... Back when your blog was online I remembered that there was an argument that could be passed to renderPosts; something like renderPosts(truncate=false) or something like that. I tried that but when I do so, php throws an error. What was the exact argument / the correct way to enable have a single post including comments rendered in full? Best wishes, DeM
  22. Phew, nice to hear that. I was beginning to worry whether the documentation would be gone forever. but in that case.... This project of mine doesn't have a schedule so I'm going to wait until you've got your documentation up and running again because w/o it I'm lost. I'm excited to see the new stuff you've got planned, so good luck on your coding, for now .... Greetings from Germany, DeM
  23. good evening gentlemen, so I have recently set up a Vagrant LAMP stack with the your Blog Module to, well, develop a blog. Unfortunately though, I seem to be unable to reach your website on which you so beautifully used to explain the ins and outs of the API to the module. Apparently the domain got deleted according to the notification on the site. So, is this a permanent state, did you stop the further development of the module or can we expect to see your site up and running again in a few days? I really liked the tutorials you offered there, since I don't know that much about web development and it offered a great starting point to get stuff going. Best wishes, DeM
  24. Hi Guys, I was wondering whether there is an option to change the language of the publishing date of each post and also the archives from English to German. So far though, I was unable to find a solution to this. Is this possible? To elaborate: I want individual posts and the archive to say : 2015 März rather than 2015 March I tried changing the locale in my header.inc but that didn't help. So is there a way to achieve this? Greetings from Germany derelektrischemoench
  25. Hi guys, thanks for the great tutorial, however, I get zero output. Which is unfortunate. I'm new to this whole thing and my php-skills are poor, but could this have to do something with the last line of the file, the template-include? // include site's main template which outputs everything include("./home.php"); It would be awesome if anyone could help me with this. By the way, what would be my main template? I thought there was no such thing, the only thing that's consistent in my pages are the includes of the header and footer. /edit: I managed to do the redirect etc., after the mail is sent my code displays a success message, unfortunately though, it doesn't send a mail. I've tried several of my email adresses as recipients, it just doesn't work. Checked my spam folders as well, no luck there. I'm developing locally on a WAMP stack, could this have something to do with that perhaps something about the configuration of my apache server? /edit2: when I inspect the output of the site I get the following line: <form action="./" method="post"> Do I need to specify a designated mail option in a separate php- script? or does the one Ryan posted already do its job? Best regards, Chris
×
×
  • Create New...