Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


gebeer last won the day on November 24

gebeer had the most liked content!

1 Follower

Profile Information

  • Gender
  • Location

Recent Profile Visitors

11,336 profile views

gebeer's Achievements

Hero Member

Hero Member (6/6)




Community Answers

  1. Love them. But too heavy for me while programming. I like light background music that helps me concentrate https://www.youtube.com/user/StudyMusicProject
  2. Hello and welcome to the forum! your question is related to a 3rd party module https://processwire.com/modules/markup-processwire-photoswipe/ On the module page you can see a link "Support" which links to the dedicated forum thread for that module. You might want to ask your question there. Besides that, the module has last been updated 6 years ago. So it uses an old version of the https://photoswipe.com/ script and might not be compatible with the latest ProcessWire version. In general, 3rd party modules are maintained by their authors and it is up to them whether they update them and offer support. It is up to youwhether you want to use and rely on a module with outdated code. After having a quick look at the module code, there is no easy way of bringing in the page title into the markup through the available render options. Like stated in the module documentation, you would have to extend the MarkupPwpswpGallery class. Alternatively you could edit the module code directly to achieve what you want. For a start have a look at https://github.com/blynx/MarkupProcesswirePhotoswipe/blob/a7c495964262f30eb28e891437665913ea5c5164/MarkupPwpswpGallery.module#L162 following and https://github.com/blynx/MarkupProcesswirePhotoswipe/blob/a7c495964262f30eb28e891437665913ea5c5164/MarkupPwpswpGallery.module#L196 following.
  3. Hello all, there are some older posts about nginx configuration for PW like @LostKobrakai created a gist. We have some sites in production on apache with nginx reverse proxy. One of those is receiving webhooks from snipcart. And in some situations the POST requests from snipcart are redirected through nginx and the POST request body data gets lost in this process. We are receiving those requests in apache with headers like where "HTTP_X_HTTP_METHOD_OVERRIDE": "POST" is sent like this by snipcart ... "REQUEST_METHOD": "GET", "HTTP_X_HTTP_METHOD_OVERRIDE": "POST", "QUERY_STRING": "it=/webhooks/snipcart/&", ... file_get_contents('php://input'); is null in those cases. After doing some research I found it could be related to the location / { try_files $uri $uri/ /index.php?it=$uri&$args; } directive in the nginx vhost.conf. I couldn't find the reason for the nginx redirect since the POST request is going to an existing endpoint /webhooks/snipcart/ (with trailing slash) and making test requests with POSTMAN didn't result in redirects. Has anyone else experienced this behaviour and knows a solution?
  4. I think it is totally ok to instantiate the script multiple times within the foreach.
  5. You have this div inside a foreach. Which means that you get multiple div#container in your HTML which will not validate and might cause problems with JS. You can add unique ids to the id with something like div id="container-<?= $book->id ?>" and see if that helps.
  6. Frontend forms in general would be a good topic. There's so much to find scattered around the forum but still people seem to struggle with it, especially when it comes to frontend file uploads with WireUpload.
  7. That sounds like a good way to approach it.
  8. Sounds great. There are some PW video tutorials out there. But nothing structured or consistent like you are planning to do. Do you mean that others can contribute videos as well? You could use a platform like https://www.codecademy.com/ to publish your courses. Will propably reach a broader audience than a custom made solution. concept of "everything is a page" structuring content working with templates/fields in the admin different output strategies: delayed, MarkupRegions etc PW as headless CMS with https://processwire.com/modules/app-api/ or https://processwire.com/modules/process-graph-ql/ I wouldn't concentrate too much on that because there are tons of tutorials out there already and PW is flexible enough to let devs implement frontend stuff in so many ways. But the basics of where you can place your source files, and how to include assets in template files might be helpful. Go for it and good luck!
  9. Looking at the RepeaterMatrixPage render() method for v0.0.8, you can pass in a file path that will be used for rendering. In the DocBlock for that method it says: "* @param string $file Optional render file, if providing a field name too". But looking at the code, it actually does not require to pass a field name in order to pick up the $file param. So inside your foreach you can implement some logic based on user role and page to pass in a custom render file /** @var RepeaterMatrixPage $item */ foreach($page->items as $item) { $renderFile = ($item->getForPageRoot()->foo == 'bar' && $user->hasRole('baz')) ? '/path/to/custom/renderfile.php' : ''; echo $item->render('', $renderFile); }
  10. @Gideon So you posted just seconds before me 🙂
  11. For the select dropdown you can use a Page Reference field (e.g. named "content_pieces") with Input field type AsmSelect. This will give you a sortable list of pages: As for grouping the pages that hold the pieces of content, you have multiple different options to go about. Here just 2 examples: put them under one parent: in content_pieces field settings, under setting "Selectable pages" choose that parent give all pages a checkbox field, named e.g. "content_piece", under setting "Selectable pages" choose "Selector string" and enter (without quotes) "content_piece=1" Now in your template PHP you can loop through and output the desired content. Assuming content is in field named "content": foreach ($page->content_pieces as $p) echo $p->content;
  12. Don't think this is DB related then. Umlauts in sanitized selector value are not breaking the selector in my case $val = $sanitizer->selectorValue("äöü"); db($pages->find("title=$val")); // results in: // ProcessWire\PageArray // count: 0 // items: array (0) // selectors: 'title="äöü"'
  13. You can set the collation per database. See here: https://dev.mysql.com/doc/refman/8.0/en/charset-database.html You can run this query for a database to see current charset and collation: USE db_name; SELECT @@character_set_database, @@collation_database; You can run this query for a database to change charset and collation: ALTER DATABASE db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
  14. Then it should have utf8mb4 charset. Is it in the list of charsets when you run the query "SHOW CHARACTER SET;" like described above?
  • Create New...