Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

6 Neutral

About CalleRosa40

  • Rank
    Jr. Member

Profile Information

  • Gender
    Not Telling
  • Location

Recent Profile Visitors

587 profile views
  1. One more tiny little thing. CKEditor's source view does not seem to work with AOS enabled. Entire screen (including modal) gets dimmed. Upon clicking OK to close modal, the page even "freezes", making it necessary to reload. Is anyone else experiencing this behavior? Sorry, forgot to do proper forum search first. Bug has been covered.
  2. @Robin S, you were spot-on. Thanks! I configured AOS AddNewChildFirst for template of parent page. My bad. Now everything seems to work fine. However, name of submodule is kind of misleading IMHO ... @horst, thanks to you, too! And thanks for your work, your module served me well for a long time. P.S. Just realized that Privacy Bagder add-on prevents automatic "@user name" in Firefox ...
  3. Hi there, Thanks for an awesome module! I only recently discovered AddNewChildFirst, before that I used @Horst's older module (Pagetree Add New Childs Reverse) to have new pages placed at the top of the page list. After uninstalling Horst's module, I tried to replace its functionality with AddNewChildFirst by enabling the submodule for the template I need it for. Unfortunately that didn't work. Has anyone managed to do this? Is it like with Horst's module that it doesn't work on pages that already have existing child pages? The docs don't say anything about it. Or is it that Horst's module modified my pages in a way that collides with AddNewChildFirst's workings? Any hints are appreciated!
  4. @teppo Thanks for your help! Sorry for the delay (and sorry I have to get back to this). Yes, you're right, I use Hanna Code on my site. My code works fine though except when called by your indexer. I noticed another thing: When trying to save the page which calls my HC, PW gives the same error as above. This is the content of my HC causing the trouble: if($page->images_gallery->count()) { // images_gallery is a repeater field $gallery = "<div class='gallery'>"; foreach($page->images_gallery as $img) { if($img->image_caption) { $titleAttr = "title='" . strip_tags($img->image_caption) . "'"; $imgCaption = "<div class='lightbox-caption'>$img->image_caption</div>"; } else { $titleAttr = ""; $imgCaption = ""; } $gallery .= " <a href='{$img->image->url}' $titleAttr> <img src='" . $img->image->size(250, 250)->url . "' alt='" . $img->image->description . "'> $imgCaption </a> "; } $gallery .= "</div>"; echo $gallery; } This is tailored to output formatting being on, as is usually the case when HC is called. How does your indexer handle OF when it pulls content from fields? I'm still confused by the fact that triggering your indexer via API does NOT lead to any error. The error seems to appear only when the backend is "involved". Any ideas? Thanks a lot!
  5. Hi @teppo, Thanks a lot for your module! Whenever I check "Index pages now?" in the module's backend config and save to build/rebuild the index field, PW throws a lenghty error (see attached PNG). I've selected a couple of text/textarea fields to index and included the index field in my templates. Calling $modules->get('SearchEngine')->indexPages(); from the search template seems to work fine though. Am I making some newbie mistake here or is that an actual bug?
  6. Hi, I had this piece of code in my template file's head section, a fix for older IE browsers: <!--[if lt IE 9]> <script src="<?=$config->urls->templates?>js/html5-3.6-respond-1.4.2.min.js"></script> <script src="<?=$config->urls->templates?>js/rem.min.js"></script> <![endif]--> EMO 1.2.2 inserted its own code inside the conditional comment which resulted in it not working properly (in browsers other than old IE, of course): <!--[if lt IE 9]> <script> var emo = emo || {}; emo.key = 'PDHeN7ZbGViB1m0ATUpc5rC3tY_8fgEqkl6dw2nMKQSLxWouahI.4vJFyOXzs9Rj'; </script> <script src="/site/templates/js/html5-3.6-respond-1.4.2.min.js"></script> <script src="/site/templates/js/rem.min.js"></script> <![endif]--> I don't know the exact way EMO determines where to place its code, but it should probably make sure its JS does not end up in any conditional comment. Apart from that, thanks a lot for a very useful module. Michael
  7. Hi all, I'm using the current version of MarkupCookieConsent on PW 3.0.62, but it doesn't seem to work anymore (used to work fine a while ago). No error message whatsoever is displayed, but still no cookie is set (checked it in browser as well as on module's config page). The consent message isn't displayed either. I've already deleted/reinstalled the module two times. Is anyone else experiencing the same problem? Suggestions? Thanks a lot! Michael
  8. $page->editUrl is still lacking from the cheatsheet. (However, it has found its way into the API reference, cf. https://processwire.com/api/ref/page/edit-url/.) Would be nice and helpful if somebody could fix this. The cheatsheet is still being maintained, right?
  9. @adrian I just added my two newbie cents to the Github thread. A slightly cleaner and more "additive" solution would be this, I guess: $repeaterItem->addStatus(Page::statusUnpublished); $repeaterItem->removeStatus(Page::statusOn); However, that's still a rather ugly workaround for PW's confusing behavior.
  10. @adrian Thanks a lot. That was the right track indeed. Yes, I'm experiencing exactly the same strange behavior as described in your bug report. Setting $repeaterItem->status=2048 instead of using addStatus() works for me. For the record, from FieldtypeRepeater.module: @horst Thanks to you, too. Yep, I kept all that in mind.
  11. Hi all! How can I unpublish/hide a repeater item using the API instead of manually toggling its status in the backend? I searched high and low in the forums but did not find much on the topic ... Knowing that repeater items are actually pages, I've tried playing around with $repeaterItem->addStatus(Page::statusUnpublished) and $repeaterItem->addStatus(Page::statusHidden). No luck though. What's the correct way to do this? Could someone please put me on the right track? Thanks!
  12. $_SERVER['REQUEST_URI'] does the trick. Thanks, @blynx and @flydev.
  13. Hi all, I've created a custom template to display 404 errors including a search field etc. When this template is called up, that is, a visitor has requested a page that doesn't exist, I would like to notify the admin that a 404 error occurred by sending a mail using PHP's mail() function. This mail should include the URL that triggered the 404. How can I retrieve that URL in the template? $page->httpUrl just returns "http://mysite/http404", which is of no use. However, the non-existing URL - the one I want - is shown in the browser's address bar. Thanks a lot!
  14. Cool, thank you very much. "Quite easy" indeed. Automatic HTML/CSS generation via $paginatedPageArray->renderPager(); works this way, but if you display the array, it always contains the full set of starting-page items on any of the paginated pages. I guess this has something to do with there being no real selector the array was "built" with (as it would have using $pages->find(), cf. http://cheatsheet.processwire.com/pagearray-wirearray/pagearray-only/a-getselectors/). I added $outputPageArray = new PageArray(); for($i = $start; $i < $start + $limit; $i++) $outputPageArray->add($paginatedPageArray[$i]); after your snippet to create a new output array that contains only a subset of pages (e.g. 1-10, 11-20 etc.). So far, this seems to work fine.
  • Create New...