• Content Count

  • Joined

  • Last visited

  • Days Won


gebeer last won the day on March 26

gebeer had the most liked content!

Community Reputation

759 Excellent

About gebeer

  • Rank
    Distinguished Member

Profile Information

  • Gender
  • Location

Recent Profile Visitors

7,620 profile views
  1. gebeer

    @thomasaull Great that you are converting this into a module. It would be a muc better fit. That way we can add api funtionality to any site easily. Actually, I was thinking about converting your site profile to a module, too
  2. gebeer

    Hallo, I wanted to test this site profile and cloned PW 3.0.98 from git. Then cloned the site profile repo and installed PW without any issues. I issued the 2 composer commands to install dependencies. Environment: Apache with PHP 7.0.29 FPM/FastCGI. When I try to access api/test, I get the following error Looks like a namespace issue. I didn't change namespaces on any of the files included in the profile. My config.php is not namespaced. Does anyone have an idea how I can overcome this? EDIT: apache_request headers became available under FastCGI since 5.4.0 according to EDIT2: After some more investigation I found So it seems apache_request_headers is still not supported in PHP 7.0 FPM/CGI environment. I added templates/inc/functions.php with contents of and added require "{$config->paths->templates}inc/functions.php"; to api.php This solved the problem :)-
  3. gebeer

    I ran into a similar issue with v1.1.0. using Javascript Loading method: Load file to $config->scripts emo.min.js is included on the page before the <!-- emo --> script block which defines var emo_addr. The function emo_replace() never gets called because at the point of script inclusion emo_addr === undefined. In v1.5 of emo.js window.onload was removed. So the script never executes when emo.min.js is included before the <!-- emo --> script block. I have refactored emo.js as an object literal and modified the module Code so that the script block calls emo.init(emo_addr) after defining the addresses. Tested without problems. Modified module can be found at @Roope do you want a PR for that?
  4. gebeer

    I've been following the discussion about language translation for this module. It is convenient to edit the language specific texts on the module settings page. But if they were implemented as i18n language translation strings, I guess all those problems would be solved. I personally wouldn't mind to edit those under Settings->Languages as long as there is a hint on the module settings page.
  5. gebeer

    Hello, I just installed this module on PW 2.7.2. On the module settings page I get an error "Call to a member function render() on a non-object" from line 78 of CookieManagementBanner.module. $this->wire('files') is null. If I replace line 78 with the following, everything works ok. $cookieBanner = wireRenderFile($this->wire('config')->paths->$this.'wrapper.tpl.php', array('module' => $this, 'lang' => $lang)); Seems like wire('files') is not available in 2.7.2 which is strange. Can anyone confirm this?
  6. gebeer

    Anyone interested in the module with added region option and with added o:deliverytime option can use my fork at
  7. gebeer

    @cb2004 attached is an amended version of the module and module config. I added a setting for the region and the API URL will adjust accordingly. WireMailMailgunConfig.php WireMailMailgun.module
  8. gebeer

    Could you please share a link to the mailgun docs where this is mentioned. Thank you. EDIT: Never mind. I found it:
  9. From the API side it is still valid and working code. I don't think there is one best way to go. This tutorial shows one possible approach. There are many different other approaches possible. But at least it shows the basics of implementing a REST API. You can also have a look at which is the most recent approach I'm aware of.
  10. gebeer

    @Peter Knight What do you want to do with products that do not have images? In your foreach you define the $image variable only when there are images. Then you echo the images even if there are none. This will give you a PHP notice for $image is undefined. You'd need another if condition within your echo to check for isset($image) and only output the image if there is one. The way you setup your images field it should definitely return an empty array if there are no images so the if (count($prod->images)) should work as expected.
  11. gebeer

    This is an option only for visitors with JS enabled. I decided to copy the module to site/modules and extend it there. Though it would be really nice if we could extend the comments form with hooks.
  12. Hello, I need to add a checkbox to the comments form to make it GDPR compliant and I guess I'm not the only one... Doing a search and looking at the FieldTypeComments module file it seems that the only way to add custom fields to the form is by copying the module to site/modules and apply the changes there. I am just wondering why the comment form is not driven by the PW form API and also why none of the methods in that module are hookable? Would be much appreciated if you could share your approaches on handling this.
  13. don't think so since the error method is not hookable nor is any other method in that class that would give you access to what you need.
  14. If you don't want to change the core Inputfield.php that @PWaddict points to, you can copy the whole Inputfield module folder to site/modules and apply your changes there. When you then refresh the modules in the backend PW will ask you from which location the module should be loaded.
  15. gebeer

    Have you tried <?php // get all pages in page field sorted by manual sort order $resultsAllSorted = $page->my_page_field->sort('sort'); // filter $resultsCategory = $resultsAllSorted->filter('category=1474'); // loop foreach($resultsCategory as $result) { // ... } ?