Jump to content

patman

Members
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

532 profile views

patman's Achievements

Jr. Member

Jr. Member (3/6)

2

Reputation

  1. 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!
  2. 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!
  3. 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.
  4. 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 ...
  5. 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).
  6. 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 ...
  7. 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.
  8. 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.
  9. 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?
  10. 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.
  11. @gmclelland Thanks I stumbled over it and had a quick look at it. Unfortunately, I decided to include my own php file that renders the schemata because I oversaw the customization options in that module. I'll switch at some later time, thanks!
  12. I did some deeper looks into the code, it seems that a few things are already prepared / were used previously: InputfieldLeafletMapMarker.js already contains a variable $addrJS that could store raw json. InputfieldLeafletMapMarker.module renders a hidden field _js_geocode_address that looks like intended for that purpose but it's coded wrong (id, no value). My thought is to use these variables to store the raw json and generate the currently used "address" out of them (by simple extraction of the name). Then I would store the raw value into the database field "data" so there is no need to update the scheme with an extra field "raw". Original field address can again be regenerated from the raw json anyway. I might have some time on the weekend to go deeper. Let me know if you have some more ideas/hints. I'd like to have the possibility to generate the json+ld for the website automatically.
  13. Sorry, should have given more details about my trials. I unfortunately have no experience with programming modules for processwire so I would need some more hints to fix it. The problem is that the value does not get stored into the database. (I tested it by putting a fixed string there.) The reason for this I suppose is that InputfieldLeafletMapMarker.module requires an input field in the __render function in order for processwire to store it, when the page is saved. My problem now was to get this field dynamically populated by the javascript part of the module, i.e. add appropriate code to InputfieldLeafletMapMarker.js. That's were I currently stand.
  14. Hi! @BrendonKoz I ran into the same issue that I would like to use the json data returned to populate json+ld structures. Did you ever find a solution? I played around with your code from github but couldn't fix it. Thanks!
×
×
  • Create New...