gebeer

Members
  • Content count

    658
  • Joined

  • Last visited

  • Days Won

    6

gebeer last won the day on January 2

gebeer had the most liked content!

Community Reputation

572 Excellent

About gebeer

  • Rank
    Distinguished Member

Profile Information

  • Gender
    Male
  • Location
    Germany/Thailand

Recent Profile Visitors

6,618 profile views
  1. @adrian Thank you for the input. I have been able to get the query like mentioned in the post above yours. This is quite some time back now. In the meantime I've come to love Tracy Debugger. It is very easy to setup and makes debugging fun. Wouldn't want to miss it now
  2. For hosting environments where you cannot change my.cnf and make settings persistent, you can do this: https://github.com/processwire/processwire-issues/issues/28#issuecomment-252870084 I just implemented it and it is working fine.
  3. Spot on, thank you. In my case it was ONLY_FULL_GROUP_BY that caused the problem This helped solving it:
  4. @LostKobrakai That did the trick. Site is back to normal now. Thanks a lot!
  5. @rastographics Which operating system are you on and which docker version are you using?
  6. @felic Yes, it is possible on the console and through phpadmin. But the changes can only be made by a user with root privileges and they will not persist. So after a restart of mysql they will be lost. In most shared hosting environments we are not allowed to do these changes ourselves...
  7. @Robin S Thanks for the tip. In 3.x there is a setting $config->dbSqlModes = array( "5.7.0" => "remove:STRICT_TRANS_TABLES,ONLY_FULL_GROUP_BY" ); in https://github.com/processwire/processwire/blob/master/wire/config.php#L869 But it seems that 2.8 is not supporting those mode settings. At least I cant find anything related in https://github.com/processwire/processwire-legacy/blob/master/wire/core/WireDatabasePDO.php or https://github.com/processwire/processwire-legacy/blob/master/wire/config.php
  8. @justb3a Did you change the settings in the my.cnf file or through phpmyadmin? I read that in order to make the changes persist across DB server restarts, we have to change my.cnf. What for shared hosting where we only have access through phpmyadmin?
  9. @adrianmak We're ecperiencing problems on a PW 2.7.0 install after MySQL upgrade to 5.7. Do you have any further findings, are PW 2.7 and MySQL 5.7 versions not compatible or did you get it to work?
  10. Hello, on a page that is live for over a year now, we get this error when trying to add a new child page to a certain parent: "Field 'sort' doesn't have a default value" EDIT: here's the whole error message: Couldn't find anything related on Google so I post here. The parent page has set sort for children by created date. No errors in eeror or exception log. When trying to save the new child page, the system also says that the name is already taken. But page under same parent with same name does not exist. Page is created in the background, though. When manually changing the name of the page (adding "-1" to the name), a new page is saved in the background but the system still says that the name is already taken. Now I'm clueless of what to do. Any help would be much appreciated.
  11. @rastographics you're welcome. I didn't know much about docker either, before I put this together. Took me 2 days to get to know basic concepts and find existing images that I could base mine on. Read about docker-compose, too. But I decided to first learn proper use of docker with native docker utilities before using some wrapper around it. Makes me feel more confident when it comes to solving issues. Also, when you have setup your containers once with docker run ..., they are very easy to handle. Example: you have set up 3 containers following the README.md with names nginx, mariadb, example_com To stop them, just run: docker stop nginx mariadb example_com Next time you want to work on example_com: docker start nginx mariadb example_com Then you setup a fourth container with a new dev project with docker run --name example2_com ... To work on that project. you do: docker start nginx mariadb example2_com Its that easy. So I have no need for docker-compose. Just had a very quick look at wocker and it looks interesting. With my system I can start up a new project within less than 5 minutes. And thats quick enough for me
  12. @microcipcip WireHttp is meant as a replacement for external PHP http client libraries like guzzle etc. You would want to use these when you 'talk' to the REST API that you set up with PW. Don't confuse this with clsource's Rest Helper class that I am using in my tutorial. You would still use that to build your REST API on the PW side. Today, If I wanted to develop a PW application that exposes JSON data through an API I would go with the brandnew GraphQL module by Nurguly. Seems like a much cleaner approach compared to REST.
  13. As for organising your forms in the page tree, you could also save all form pages under one parent. When you save a form page via API, you can set the user who has created the form (which is the logged in $user). Some dummy code to achieve this $form = new Page; $form->template = 'form'; $form->parent = $pages->get('template=formparent'); /* set user who created this form */ $form->set("createdUser", $user); Then in the user's dashboard you get all the forms for that user with something like $forms = $pages->find("template=form, created_users_id={$user->id}"); I'm using this approach in some projects with frontend user dashboards and it works really well. Users can only see the content they created. All user content (here forms) lives under one parent page which makes it easy to create and query. Important note: in the backend you need to edit the form template and enable "Allow the 'created user' to be changed on pages?" under the "Advanced" tab. For the admin dashboard where forms for all users should be listed, you might want to spend a few bucks on Lister Pro. This saves you from developing a custom admin page. Lister Pro is very powerful and you can create a Lister that shows all pages with template form. You can list all forms sorted by created date, filter for forms of specific users etc. Also inline editing for the status field is possible. So admins can change the status very quickly. For the multi-step form: I also think that using Angular here would be overkill. I have a multi-step form that I render with PHP and use some very simple JS to step through the form. The form is divided into fieldgroups that reflect the steps. In the JS you can use AJAX to save the steps of the form that have been completed. Since you want to store the form data as JSON, you might want to look into a JS form framework that renders forms from JSON, something like Alpaca Forms. This would save you from creating the form rendering logic on the PHP side. They also support multi step form wizards. And, finally, what @adrian suggested above for creating users under different parents makes a lot of sense. I use this approach quite often.
  14. @microcipcip At the time of writing this tutorial and coding a real world application that uses this approach, I wasn't aware of the fact that PW brings it's own http client Class WireHttp. So today I wouldn't bother using an external library like guzzle or phphttpclient. I would go with WireHttp. It has all the methods you need. @clsource thanks for answering microcipcip's questions so thoroughly.
  15. Update: Working with this setup I found that installing modules with the installer from the admin did not work because php-zip module was not installed. I fixed this and pushed the new image and Dockerfile to dockerhub and github.