Jump to content

ngrmm

Members
  • Posts

    232
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://www.engramm.com

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

2,488 profile views

ngrmm's Achievements

Sr. Member

Sr. Member (5/6)

46

Reputation

2

Community Answers

  1. maybe because of the 0 values for x and y? btw, do you do that?
  2. @joshua I'm using GoogleMapsApi on a page. And did this: <?php // allow button echo "<a class='privacywire-consent-button' data-consent-category='external_media'>allow cookies</a>"; $address = $content->map_address->address; $lat = $content->map_address->lat; $lng = $content->map_address->lng; echo "<script > var lat,lng,zoom; lat = $lat; lng = $lng; </script>"; // map stylung and render function echo "<script type='text/plain' data-type='text/javascript' data-category='external_media' data-src='{$templatesUrl}scripts/gmaps.js' class='require-consent'></script>"; // maps API echo "<script type='text/plain' data-type='text/javascript' data-category='external_media' data-src='https://maps.googleapis.com/maps/api/js?key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX&callback=initMap' class='require-consent'></script>"; // my map echo "<div id='map' class='wrapper'></div>"; When I click on the allow button, all content disappear and there is a error domain.com/:1 Uncaught (in promise) Qe {message: 'Map: Expected mapDiv of type HTMLElement but was passed null … However the cookies are allowed. So that if refresh the page, everything is fine (cookies allowed and map is shown). What am I missing?
  3. @Pixrael thanks a lot! Great Idea to find out the outdated pages with the timestamp! I learned a lot!
  4. I would like to create pages from a json feed. So i decode my json and create them via API. $jsonData = json_decode($jsonFromOtherWebsite); foreach($jsonData as $jsonDataItem) { $pageTitle = $jsonDataItem->name; $p = new Page(); $p->template = 'import_page'; $p->parent = $pages->get(xxxx); $p->title = $pageTitle; $p->save(); } Let's say the source (json) changes and i have to do another import. Then I want to compare the new json with the existing pages to see if there are new ones and if there some aren't there anymore. Is there a way to compare the new JsonData with my existing pw-pages with the API. Something like foreach($jsonData as $jsonDataItem) { // check if a page with this title exist if($pages->find("template=import_page, title=$jsonDataItem->name") { // update existing field values $getExistingPage = $pages->find("template=import_page, title=$jsonDataItem->name"); // update value $getExistingPage->setAndSave('field', $jsonDataItem->x); } else { // create new page $pageTitle = $jsonDataItem->name; $p = new Page(); $p->template = 'import_page'; $p->parent = $pages->get(xxxx); $p->title = $pageTitle; $p->save(); } } // search for pages wich are not anymore in the json and hide/delete them // …
  5. https://domain.com/_tmp/processwire/fluency/
  6. Thanks @FireWire Actually the folder is already showing up in the error message above. When i do your quick fix i get this: fluency_tools.js:60 POST https://domain.com/_temp/_temp/fluency/data/ 404 moduleRequest @ fluency_tools.js:60 (anonymous) @ fluency.js:579 load (async) (anonymous) @ fluency.js:576 VM752:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) at XMLHttpRequest.xhr.onload (fluency_tools.js:53) xhr.onload @ fluency_tools.js:53 load (async) moduleRequest @ fluency_tools.js:52 (anonymous) @ fluency.js:579 load (async) (anonymous) @ fluency.js:576
  7. are there any known issues with pw-installations inside a folder? It works for me on a website like domain.com but not on pw-installation like domain.com/_temp/ I get this errors on a backend pageload fluency_tools.js:60 POST https://domain.com/_tmp/fluency/data/ 404 moduleRequest @ fluency_tools.js:60 (anonymous) @ fluency.js:579 load (async) (anonymous) @ fluency.js:576 VM287:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) at XMLHttpRequest.xhr.onload (fluency_tools.js:53) xhr.onload @ fluency_tools.js:53 load (async) moduleRequest @ fluency_tools.js:52 (anonymous) @ fluency.js:579 load (async) (anonymous) @ fluency.js:576 @FireWire you hardcoded the paypalme-PNG-Url into FluencyConfig.php (line:365). It's broken. /Fluency/img/paypal_me.png > /Fluency-Translation-main/img/paypal_me.png
  8. thx @BitPoet I guess there is Typo in your Snippet. Missing closing }? However I get a 500 Error. So I tried this: <script type="text/javascript"> <?php $jsConfig = $config->js(); ?> var ProcessWire = {config: <?php echo json_encode($jsConfig); ?>}; var config = ProcessWire.config; </script> and $config->js('mySettings', [ 'foo' => 'bar', ]); but console.log(ProcessWire.config); outputs an empty array
  9. I would like to pass over a string from PHP to JS. I guess thats the way to go: https://processwire.com/api/ref/config/js/ However when i try it i get the error: Uncaught ReferenceError: ProcessWire is not defined at HTMLDocument. I think it's because of missing ProcessWire object in my js file. How do I import it?
  10. Hi @wbmnfktr, look here: https://dr-dsgvo.de/ist-mailjet-datenschutzkonform-nutzbar/ I don't know if this is a reliable source but sounds legit. And did it work for you with the WireMailMailgun?
  11. hey @benbyf, as you see above i had/have same problems. Back then i read something about issues with SSL preventing tracking.
  12. i would say the name on a profile page lacks a bit of contrast
  13. I found another solution and it works for me. First I loop through my pages and save the needed content into a helper-textarea-field. I added this helper-field into the indexed fields and this works. I guess this is not the best for the performance but it works for me. Thanks again
  14. ok, I'm a noob but I'll give it a try. I will use my loops and add the needed content to the searchindex. But where should i place this hook to run it after a page is saved in the backend?
×
×
  • Create New...