Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

51 Excellent

About chrizz

  • Rank
    Full Member

Profile Information

  • Gender
  • Location
    Berlin, Germany

Recent Profile Visitors

3,547 profile views
  1. Hey guys, I am recently migrated my whole setup to a newer environment, using Vagrant, webpack and the latest version of PHPUnit. Everything works fine except the tests are driving me crazy. It worked long time ago already but nowadays I have some trouble with the test output and I hope that someone has an idea. If I run a single test via my Eclipse IDE it works perfectly and the output as shown as expected. I see all tests in a nice overview including all passed and failed tests. But as soon as I include the index.php from the root directory to utilize the PW API the output is killed completely. Something must cause interferences between PHPUnit and including the PW API. I am using PW 3.0.62 and tried with PHPUnit 6.5.14, 7.5.8, 8.1.2 and PHP 7.1.28, 7.2.16. Regardless which configuration - it all ends when PW is included Any ideas where I might dig into are really appreciated.
  2. chrizz


    Yes, the site is also hosted on 1&1. And no, also gmail does not work. So proabably something wrong with 1und1. Will ask the support. Error message is Thanks for pointing me to the obvious things
  3. chrizz


    I am having trouble setting this module up on the client's webspace. Locally it works like charme with the given data (as seen here - only in German: https://www.ionos.de/hilfe/e-mail-office/allgemeine-themen/einstellungen-fuer-ihr-e-mail-programm/) Locally I use SSL via port 465 (host: smtp.ionos.de) After copying the whole processwire installation to the clients webspace I updated the hostname but then out of the sudden the SMTP server isn't reachable anymore via SSL (nor TLS). Only unecrypted connections are working. Is there anything obvious I am missing? Thanks a lot for your support!
  4. @kixe Awesome! I guess that explained in pretty much in detail! And guess what: after ignoring this problem for 24h now it solved itself... like always Thank you very much for this detailed explanation!
  5. this question can be also asked on stackoverflow, but I think supporting the local forum is much better I discovered the following issue while using PHPunit tests to cover some module methods: If I declare an array in the init() method of a module it's not accessible in another method called from the testcase. If I move the same array initialization to the __construct() method it's working as expected. I am not sure if this is an issue with PHPunit, PW or just a misunderstanding by me. Is there anyone out there who has some more expert knowledge about this? Thanks!
  6. to finalize this approach if($f->type->manager->getOptions($f)->has("title=".$this->input->whitelist("userInput"))) { // user selection is valid }
  7. I was wondering if there's an easy way to validate if a title is a valid value for a FieldtypeOptions field. I have created a field with different status values where only a single value can be selected: 1=done 2=planned 3=error Now I am going to update the page which includes this field which works fine so far - but: I I am using any other string than the defined options it stores a blank value. To avoid this I am trying to validate the input before. Something like getAllOptionsForField > in_array() etc would work but maybe there's a build-in method I am currently missing? Long story short: how would you validate if the given string is a valid option for a field? as usual: Thanks
  8. thanks everyone for clarification. It was obvious as it wasn't mentioned in the documentation but sometimes asking for help offer new implementation approaches :))
  9. hey there, I was wondering what the best approach looks like to access the input (entity) body from a POST or PUT request. I didn't find anything in the docs if $input supports these. If anyone has dealt with this problem in the past I'd be happy to hear about your solutions Thanks & cheers!
  10. awesome! thanks so much @adrian!
  11. Is there an easy way to enable/disable Tracy debugger via API? As I am still on my way to create test with PHPUnit it would be awesome if there's an easy way (ideally via config.php) to disable tracy if it's called from the phpunit testing scripts.
  12. Just as a heads up if someone needs database testing: I am trying a different approach at the moment: I simply added a database configuration to the config.php which is used if PW is called from PHPUnit. in config.php if(isset($_ENV['UNITTEST']) && $_ENV['UNITTEST'] == true) { $config->dbHost = 'localhost'; $config->dbName = 'db-test'; $config->dbUser = '...'; $config->dbPass = '...'; $config->dbPort = '3306'; $config->httpHosts = array('localhost'); } and my PHPUnit configuration.xml looks like this <phpunit ... some settings here ... > <php> <env name="UNITTEST" value="true" /> </php> </phpunit> maybe this will save someone a headache in the future
  13. I think these two lines would be fine. I guess you don't have the need for an additional module but maybe someone else will join the discussion with a different approach/opinion on that?
  14. Ah ok. I was afraid that I missed something But anyways: same does the module during the installation process: It adds language and country code fields to each language template. Regarding x-default, I'd recommend this for reading: https://www.rebelytics.com/multiple-hreflang-tags-one-url/
  15. @Sergio yeah, it's not that complicated - therefore I asked how you handle this before submitting a module Regarding your snippet: imho "x-default" is missing here. If you don't want you site to be listed in other languages/regions as defined than your snippets works fine but as soon as you have a default language for the world's audience this won't work. May I ask where this comes from? $language->lang_code; Maybe I have some weird old setup but this variable is empty
  • Create New...