Jump to content

lpa

Members
  • Posts

    208
  • Joined

  • Last visited

Everything posted by lpa

  1. It seems to me, that the http404-page is rendered before the decission to redirect to the page in page path history is done. I would like to know when rendering http404, that there will be a redirect and the http404 page should not be tracked in Matomo as a page load. But I can't figure out how to detect this. HTTP_REFERER does not help, as I am interested to detect the forthcoming 301 before the 404 page is rendered.
  2. My straightforward question is: How can I determine on the '/http404/' page whether it's being accessed solely due to a redirect with a status code of 301 leading to the updated URL?
  3. I am trying to implement server level analytics calling Matomo PHP tracking API from page footer.php that is included in every template. When I call for a renamed page URL handled by a 301 redirect, it seems to go first to '/http404/'. The $_SERVER['REQUEST_URI'] for the call is '/oldpath/pagename/'. It is handled by '/http404/' having URL '/http404/pagename/' in URL column when logging with `$log->message($page->url)`. I don't understand what is really happening here. How should I detect that the requested path was '/oldpath/pagename/' and that it caused a 301 redirect and it should not be tracked in Matomo as a page load?
  4. lpa

    Auto Smush

    I have had problems with this module lately with errors to contact reSmush.it: reSmush.it (auto): Error optimizing /site/assets/files/1022/xxx.jpg, 0 ? (possible request timeout) Has anybody else had problems with this module lately?
  5. We have logging of almost every page request like this: $log->save('userdb_log', $message); $log->prune('userdb_log', 30); The problem is, that the file is not saved for 30 days, but only for a few minutes. There is this error found regarding this: unlink: Given filename is not a file or link: /site/assets/logs/userdb_log.txt And then: rename: Given pathname ($oldName) that does not exist: /site/assets/logs/userdb_log.txt.new Is it not ok to try to prune the file just after the save every time? Where should the pruning then happen?
  6. I have a selector: template=adsales-entry, banner_file|video_file|is_html5|html!= template=adsales-entry, banner_file|video_file|is_html5|html!= After upgrading it does not find anything, but this one still finds: template=adsales-entry, banner_file!= Is there anything that explains why multiple field selector does not work with the new version?
  7. Any plans on adding this to PW, @ryan?
  8. The problem seems to be when the database has an empty description field which is returned as an array on line 429: $description = wireDecodeJSON($item['description']); With TracyDebugger bd($description) I get: Array Before line 452 $description = $sanitizer->entities($description); bd($description); gives: "Array" And after the sanitizer bd($description); gives: array-0
  9. First of all, the images field is inside a repeater. But I don't think that is a problem. In addition to the four different formats you show above, for some reason I have just the text in the description field, the last one. But I don't know why is that even possible, as it does not happen if I save a new description. It might be, that the language support was added later and the old descriptions are not converted to the JSON format. This is not a big issue for me. I just happend to notice that there is some weird behaviour. At least you could check that the empty description fields would not be shown as "array-0":
  10. Great module, thank you! One small problem: I have a two language site. The description field having some text shows not the text, but this: array-0. The text of the description field is not found with the search-box or Custom Search Builder, but it can be search with the filter part above. Is this a limitation of the multilanguage fields or a bug?
  11. Thanks @ryan! So the region has to be the same tag as the insertion? I wanted to create a pw-region inside <head> to know exactly where the scripts are inserted. How should I then insert the scripts in the pw-region -tag? I don't understand what would then be the correct way to use the <pw-region> or <region> tag that is described in the documentation here: https://processwire.com/docs/front-end/output/markup-regions/. The main question in my situation is how should I insert the JavaScript and CSS links from a RepeaterMatrix field in to the <head> and in a correct position.
  12. Hi, What might be the status of GroupMailer? Is it published somewhere or was it ever finnished?
  13. Is there anybody who can explain me why this does not work? Or was my question unclear?
  14. I have problems putting a Markup Region action inside a Repeater Matrix field template. I am trying to get a region be appended in a region defined in <head> like this: _main.php head has this: <head> .... <pw-region id="mainhead"> </pw-region> .... </head> And my Repeater matrix field has this: <div id="mainhead" pw-append> <?php echo $form->styles; ?> <?php echo $form->scripts; ?> </div> The problem is that the contents of the matrix field action region is not put in the <head> of the page but in place it is in the Repeater Matrix template. Is this supposed to work?
  15. Testing this module with PW 3.0.229 but nothing happens. This error in error-log: Missing GET parameters for ProcessInlineCompleteTinyMCE::execute (WireLog)
  16. In one use case we have a normal cache like this $local_data = $cache->get('calendar', $c, function() { } With PW 3.0.184 setting expire argument ($c) to -1 the cache was cleared. Now it does not work and trying to set expire argument to 0, we get '0000-00-00 00:00:00' in the database expire field instead of some valid date. What is the correct way to expire the cache by setting the expire argument OR should we always use $cache->delete('calendar') to expire now?
  17. Is there translation for the FormBuilder module anywhere, then?
  18. The repo for the modules translations gives a 404 error: https://github.com/Fokke-/Finnish-ProcessWire-Modules Is that file still available somewhere?
  19. I would add some fixed routes drawn with GPX files on the maps. There is this plugin for Leaflet: https://github.com/mpetazzoni/leaflet-gpx. But my problem is that at least the example points to much newer Leaflet version that this module is using, v 1.7.1. What is the reason, that this module is still using v 0.7.3 of Leaflet.js and how difficult would it be to upgrade it to 1.7 or even 1.9?
  20. Upgrading to 3.0.208 helped to solve this. I didn't find out what was the problem with 3.0.200.
  21. I have over 400 users in PW 3.0.200 installation. When browsing the users and trying to go to the page two, (https://site.xx/processwire/access/users/page2) I get an error: {"error":false,"message":"Unknown action"} It says using Lister v0.2.6 β What might be the problem?
  22. Hello I have sometimes problem with a PW-site where mysql is stuck with a lot of processes in a state: "Waiting for table level lock". The whole site goes down with that problem as the queue of free PHP processes is used before the database locks are released. Has anybody had the same problem? Where to look at for the reason of the locks? How to debug this?
  23. Thanks! Seems to be too complicated for my needs. How about a simple hook for the sorting phase of the admin tree?
  24. How could I define that the subfolders of a page are shown first and the children of the page then in the admin page tree? Now the children are shown first and if there are many pages inside a folder, the subfolders are shown on the last page.
×
×
  • Create New...