Jump to content

sujag

Members
  • Posts

    24
  • Joined

  • Last visited

Everything posted by sujag

  1. To be honest I don't think that stopwords are the problem. I checked this a few days ago and got only an english stopword list. Then I switched to testing different phrases and decided to ask others. Another try to explain the problem: I get the same results when searching for "Gesang der Mönche" and "Gesang Mönche" but different when searching for "Festival für Freunde" und "Festival Freunde" Why?
  2. I'm on a shared hosting, don't know about a custom config. But anyway, shouldn't stopwords just be ignored? In the search phrase and the result? Then there shouldn't be a different result searching for "Festival Freunde" and "Festival für Freunde"
  3. It does indeed work with the *= operator, but I don't quite understand why and I get more than the wanted results. I think, too short can't be the reason, cause the search without "für" works as well another search after "Gesänge der Mönche" where the article "der" doesn't interfere with the result.
  4. Thanks, but the quotes are added by the template, they are not part of the search term and this wouldn't explain a difference between the search phrases "Festival für Freunde" and "Festival Freunde" (both submitted without quotes)
  5. I have a strange problem with finding a certain (german) text in my page. On kulturfeste.de a search for "Festival für Freunde" https://kulturfeste.de/suche/?q=festival+für+freunde&submit= doesn't get results, omitting "für" https://kulturfeste.de/suche/?q=festival+freunde&submit= get's beside others the expected result https://kulturfeste.de/feste/festival-fuer-freunde/ The used selectors for $pages->find are 'title|headline|Intro~*=festival für freunde, limit=50, template=fest' and 'title|headline|body~*=festival für freunde, limit=150, template=veranstaltung,sort=eventTime' The search text appears multiple times in the relevant fields, it seems not to be the word "für" as possible stopword and not the umlaut 'ü' Now I'm running out of ideas. What else could I check for?
  6. Is there a way to sanitize email-Adresses from IDN Domains? $connInfo = $sanitizer->email($connInfoRaw); bd($connInfo); .../kulturfeste/kfweb2021/site/templates/import_geoloc.php:477 'post@kirchlein-im-grünen.de' bd($connInfoRaw); .../kulturfeste/kfweb2021/site/templates/import_geoloc.php:476 'post@kirchlein-im-grnen.de' This is obviously wrong. $sanitizer->email() has no options to allwo IDN. Any ideas, workaround how to fix this? Or at least get a warning? Since this a mass import there might be more than just this single case, which I know.
  7. Thanks for the suggestion. This works without syntax error, but doesn't give the expected results. Looking for a single (known) parent works. $regionEvents = $pages->find("template=veranstaltung,selectLocation.parent=14692,limit=$limit");
  8. I'm stuck with the selector syntax for a page reference field. After changing the site structure the old query $regionEvents = $pages->find("template=veranstaltung,selectLocation.parent=$reg,limit=$limit"); won't work any more, cause I now need a match for the grandparent of the page that is stored in the "selectLocation" page reference field. Just changing to $regionEvents = $pages->find("template=veranstaltung,selectLocation.has_parent=$reg,limit=$limit"); results in a syntax error "Unknown subfield: has_parent" What would be the right syntax in this case?
  9. I'm stuck finding the right selector syntax for an empty page reference field. I can select all pages with template "fest" that have an entry in selectLocation $oF = $pages->find('template=fest,selectLocation.id>0'); but now I need the contrary. Find all pages with template "fest" and an empty selectLocation My selectLocation Field is setup to reference a single page, but all tests with $oF = $pages->find('template=fest,selectLocation=FALSE'); or 0 or false won't work.
  10. There is no need to xxx the whole IP-address, this would indeed make no sense, only the last three digits are masked. Google analytics implements this as IP Anonymization (or IP masking) in Analytics to allow compliance to privacy statements and laws. https://support.google.com/analytics/answer/2763052?hl=en
  11. Another question. Would it be possible to partly anonymize the IP-Adresses? German (european?) privacy laws prohibit the permanent logging of ip-adresses as private data. A common solution that respects this while still allowing some analysis is to set the last triplet to 0 or xxx before it get's stored.
  12. no it was indeed the old PHP-Version. I finally found the place to switch and now the module works as expected. Thank you
  13. Yes it is the row LIMIT but it's indepedent of the value. Changing the value just alters the text of the error message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''100'' SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''25'' But I just notices, that this server still works with PHP5.6 I ask the hoster, if it is possible / planned to upgrade.
  14. Interesting module. It works in my local environment, but unfortunately online. Trying to view the statistics I get an unspecific server error (500), with Tracy debugger I get some details but don't have a clue what's happening. I assume some security setting on the host, but have no idea to find this.
  15. Thanks, this gave me indeed the necessary hint. a two step query seems to do, what I'm after $regionLocations = $pages->find("has_parent=$page"); $regionEvents = $pages->find("template=veranstaltung,selectLocation=$regionLocations,eventTime>$curYearStart")->sort('selectLocation');
  16. I'm having trouble by finding the right syntax for accessing ancestors of a page Reference field in a selector. I need to find all pages with a given template that include a page reference to some descendants of a given page. Working query is $regionEvents = $pages->find("template=veranstaltung,selectLocation.parent=$page,eventTime>$curYearStart")->sort('selectLocation'); but after changing site structure I need to find not only references to direct children, but also to grandchildren. I tried "selectLocation.has_parent=$page" but this throws an error "Unknown subfield: has_parent" Is this simply a syntax problem or do I need another way to find the pages I need?
  17. I don't really understand why, but it works, if I change lat lng values in a second step. $newPoi = $pages->add("tmbPoi", "$parentPage->url", [ 'name' => $thisPoiId, 'title' => $poi['name'], ... ] $newPoi->geolocation->lat = $lat; $newPoi->geolocation->lng = $lng; $newPoi->of(false); $newPoi->save('geolocation');
  18. I'm trying to automatically add pages containing a field with this fieldtype. while all other fields are populated as expected the lat/lng part of my geolocation field keeps its default values. Is there a special syntax to address these $newPoi = $pages->add("tmbPoi", "$parentPageId->url", [ 'name' => $poi['id'], 'title' => $poi['name'], 'PLZ' => $PLZ, 'Adresse' => $Adresse, 'body' => $descriptionHtml, 'geolocation->lat' => $lat, 'geolocation->lng' => $lng, 'canonical' => $poi->canonical ]);
  19. After adding an initial $gallery = new WireArray(); everything works as expected. Irritating with my first attempt was, that the copies of the image files where only added to the respective folder in assets/files but not to the database and the page images. At least this seems a little buggy to me.
  20. Most probably due to a lack of understanding of basic concepts I just produced a template that led to an explosion of disk space usage for the site. What I need(ed): Reusing images of certain pages for a gallery of other pages. I have a page with events that are linked to locations and want to show the pageImages of the eventPages and those Location-Pages in a gallery on the eventPages What I did: created a PageImages-Array from current (event) page $galleryfrompage = $page->images->findTag('galerie'); $gallery = $galleryfrompage; getting certain Images from connected location page $locImages = $loc->images->findTag('galerie'); adding $locImages to $gallery foreach ($locImages as $li) { if ($li != $introImg) { $gallery->add($li); }} what happened: with every visit of the event page a new copy of the images from the location page was copied to the event page I now try a new attempt without pageimages but wanted to ask, if this behaviour would have been obvious for you.
  21. Great module. I had some problems upgrading from 2.8.1 to 3.0.3. Using processwire upgrade doesn't work after several attempts on different sites I had multiple instances of MarkupAddInlineScript different versions and different paths. I finally made a backup of the database table for the field and the field definition (via export) removed the inputfield, then the complete module(s), reinstalled 3.0.3 and restored the field definition and the content to the database. In this version in the frontend the map with several markers from a pagearray didn't show, Script console said arg.split is not a function. Took me some time to realize that the init-function was wrong. The default lat, lng options came with a comma instead of a point $karte = $map->render($regLocations, 'geolocation', array('width' => '50%', 'height' => '350px', 'id' => 'locMap')); results in: locMap.init('locMap', 53,016109, 14,005830, 'OpenStreetMap.Mapnik'); I have to grab the lat, lng values of the first item and put them in the initialization $karte = $map->render($regLocations, 'geolocation', array('width' => '50%', 'height' => '350px', 'id' => 'locMap', 'lat'=>$firstLoc->lat, 'lng'=>$firstLoc->lng)); to get the right output: locMap.init('locMap', 53.016109, 14.005830, 'OpenStreetMap.Mapnik'); This might be a localization problem, since the sytem works with german settings.
  22. I ran into an issue with multilanguage support. Most sites I'm working need only one language, but for a german user interface I need the module Languages Support which automatically adds a description field for every language to an image field. I used to disable these extra language fields in the admin interface by setting disable multilanguage support in the input settings of the definition for my images-fields. After installing the Image Extra Module I added a caption field, which seemed to work fine: I could edit and process content of this new caption field. Now I noticed that it is possible to insert a new caption, but not to alter an existent one. I get a notice that the field was changed, but nothing happens. After checking the database I saw that there was a connection to multi-language support. Instead of a simple entry for new captions like "["Schloss Rheinsberg (Photo: xyz)"] an edited entry is like '{"0":"Das Refektorium","1019":"Das Refektorium"}' When I enable multi language support for the image field I can see, that only changes in the field for the custom language (in my case german) are processed but do also change the value of the field in the default language (english) This is very confusing for authors. As a workaround When changing the language of the admin to default instead of german everything works as expected.
  23. I really like this module. It's much cleaner for managing different alt-Text and caption than everything I tried before (extra fields, repeater, complex Hanna Code) but I ran into an issue on the second site I installed. The image field I wanted to enhance was named Bilder (with uppercase). After adding extra field imgcaption the site stopped working and in debug mode it read something like field Bilder.imgcaption doesn't exist. After changing the field name to bilder (lowercase) and correcting my templates and Hanna Code everything worked again. Might be worth some warning in the documentation
×
×
  • Create New...