Jump to content

patman

Members
  • Posts

    19
  • Joined

  • Last visited

Recent Profile Visitors

800 profile views

patman's Achievements

Jr. Member

Jr. Member (3/6)

5

Reputation

  1. @update AG Thanks for the feedback, I'll have a look at that specific issues. <update>I just noticed I fixed at least the first issue, but I needed to cancel the PR as I have another issue</update> @gebeer I found out that modifying the DOM while iterating over it has issues. So it might not catch some of the relevant addresses. I'll need to modify the method again. 😞 Is it possible that you provide me the HTML source of the document you tried to use with the module for testing?
  2. I fixed the PHP 8 issues and also the problem mentioned in my previous post. See my pull request https://github.com/BlowbackDesign/EmailObfuscation/pull/15 for a solution. If someone has the opportunity please test and report back if there are issues. Actually, it should be a drop-in replacement. @Roope please consider my PR after testing.
  3. Hi @Roope, thanks for letting us know! I'm fixing some issues and would provide PRs as soon as I have found a working solution. Spoiler: the regex way of looking for addresses runs into a memory/performance issues on pages containing a lot of code.
  4. Hi! I ran into the issue that for longer pages the module did not work. After a lot of research I figured out that this is an issue with the regex and can be (fixed) using: /** * obfuscate email addresses at given (html) string * */ private function obfuscate($html) { ini_set('pcre.backtrack_limit',1250000); // FIXME! required for long documents on line 315. As one can read from https://stackoverflow.com/questions/4180910/php-preg-match-all-fails-on-long-strings, in general using regex for parsing HTML documents is a bad idea (as I understood). To me this therefore sounds like the module needs some rework to do the parsing in a different way in order to avoid memory issues. Did someone already do so? Otherwise I would work on it and do a PR.
  5. @chuckymendoza try commenting out line 247 and 248: /** * is_nan(NULL) is deprecated in PHP 8.1 and $key[64] is not initialized if(is_nan($c2)) { $e3 = $e4 = 64; var_dump($c2);} else if(is_nan($c3)) {$e4 = 64; var_dump($c3);} */ worked for me without an issue and I do not see the purpose of the code.
  6. Hey @Mike Rockett! I had a suspicion stemming from the behavior of the module, i.e. working but still triggering the err404 page. Line 152 of MarkupSitemap.module.php uses $this->addHookAfter althought you are trying to cancle further hooks in line 220/221. To me that means that first the err404 page is created and then replaced by the content of your module, but I think in case the path /sitemap.xml matches, your module should take control and everything else should only execute in case it is a different path (normal processing sequence). I just changed line 152 to "before" version like this: $this->addHookBefore('ProcessPageView::pageNotFound', $this, 'render'); Since then I didn't have any issues anymore and it seems to work as intended. Not sure this fully correct as I didn't read all the necessary documentation. Nevertheless, it solves my issue and didn't seem to have any (negative) side effect. Maybe with your know how you can confirm / comment / decline this solution? Best regards!
  7. Hi! Does anyone else have the following issue? I have the MarkupSitemap module install and it works but I still get my err404 page triggered. Anyone an idea why? I can call https://myserver.com/sitemap.xml and it renders I can also call it with http://. Still some search engines manage to trigger the error page. The log of $_SERVER["REQUEST_URI"] in such a case and shows "/sitemap.xml". How can that happen? Thanks!
  8. Yes, the sitemap is generated dynamically, there is no file that you can find, but of course you can call it. If you enable the stylesheet it is also quite readable. From my understanding of the source code I would say that in contrast to what the option "Include hidden or unpublished pages" suggests, only hidden pages will be included. The option is called sitemap_include_hidden and adds include=hidden to the selector.
  9. This is an issue when no cache exists. You can try to go to /site/modules/MarkupSitemap/MarkupSitemap.module.php and modify the start of the function (line 230) as follows: ... public function removeSitemapCache(): bool { // Cache settings $cacheKey = 'MarkupSitemap'; $cacheMethod = $this->cache_method ?: 'MarkupCache'; $removed = false; // by default nothing is removed // Attempt to fetch sitemap from cache ...
  10. I just had a quick look, I think there is a bug in the render function at the end: $this->page->inlineScript = $inlineScript; This would replace the page content always with the last map. Unfortunately, I was not quickly able to fix it. In my opinion adding a dot $this->page->inlineScript .= $inlineScript; should make it, but it didn't (at least in my quick try).
  11. Well the module says it uses this https://github.com/perliedman/leaflet-control-geocoder which itself says it can also do Google. Since I did not change anything in the logic you should be able to select a different provider and then it should do exactly what you would like it to do. Just one further step ahead ...
  12. Thanks for your feedback, I'll fix a few things Well, it is actually the purpose of this module not to use Google API. The description says So if you want to use Google you actually forked the wrong module maybe you should take a look at https://modules.processwire.com/modules/fieldtype-map-marker/ If you want the same modifications can for sure be also done there.
  13. I made my cleanup and pushed it to github: https://github.com/madebymats/FieldtypeLeafletMapMarker/compare/PW3...patman15:PW3 There is most probably still an issue with the default value, as I could not figure out how this works in the available time. Nevertheless, that has no real impact. I would be happy if some one could have a look and give feedback and/or test the version. I also added the new DB schema to allow for automatic updates. A smoke test went successfully. I'll wait for some feedback and make then the pull request.
  14. To give a status: I got it working I need to do some clean up and then I can provide it. @BrendonKoz Should I make a pull request to your code or to the original one?
  15. Ok, I'll give it a try on the weekend again. I really want to achieve correct address values so the users cannot mess-up text fields used for json+ld.
×
×
  • Create New...