Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


psy last won the day on September 30

psy had the most liked content!

Community Reputation

631 Excellent


About psy

  • Rank
    Sr. Member

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

3,474 profile views
  1. Solved! Thanks @Zeka Solution: <?php // in my auto-loaded custom module public function init() { $this->addHookAfter('ProcessPageView::pageNotFound', $this, "unpublishedProfile"); } public function unpublishedProfile (HookEvent $event) { $page = $event->arguments(0); if ($page->isUnpublished() && $page->template == 'profile') $this->wire('session')->redirect($this->wire('pages')->get(1312)->url); }
  2. Thanks @Zeka, think you're onto something there. I searched but could not find
  3. For pages with a particular template, I would like them to display/redirect to a different page from the normal http404 page when status is unpublished. Can't figure out what to hook and where. Un-working code is: <?php // in my auto-loaded custom module public function init() { // this hook doesn't catch... returns the normal http404 page for unpublished template=profile pages $this->addHookBefore('Page("template=profile")::loaded', $this, "unpublishedProfile"); } public function unpublishedProfile (HookEvent $event) { $page = $event->arguments(0); if ($page->isUnpublished()) $this->wire('session')->redirect($this->wire('pages')->get(1312)->url); } Also tried to hook After page loaded with same result, ie default Page Not Found shown. Help & suggestions to fix much appreciated. Cheers psy
  4. @rick Rather than use the problematic PW front-end image uploads, I went for uppy and with @Robin S' amazing help, got it working. Tus/Uppy has a nice drag-n-drop user interface, overcomes file size limits, allows for resumable uploads + more. In Robin's example, he saves the images to a new page. In my case, I prepended the page id and an underscore to the filename in the Uppy js code. Then, in the uppy server page code, identify the required page by exploding the filename on the underscore. Maybe time to get a new horse?
  5. Great addition to FB, thanks @BitPoet Small problem when using FB40a with PW3.0.145 to remember form entries in a cookie. On revisiting the form displays the number of rows I've added but they're empty of data.
  6. Lots of PW goodness in this one too: https://processwire-recipes.com/
  7. psy


    Thanks again @teppo. I tried a few things with my limited knowledge of Apache including changing root dir privileges to 777 (scary I know!) for testing purposes to see if the error message was correct. Didn't change anything so switched the root dir privileges back to PW preferred settings. Obviously something is amiss and fairly certain it's not that SeoMaestro cannot create the file. I even saved a dummy sitemap.xml file (updated module prefs to same file name) in the root dir and still no luck. I've used this module before with success on other sites with earlier PW versions. Problem reared its head with PW1.0.142+. Wondering if maybe latest .htaccess or other is affecting things? @Wanze?
  8. psy


    Hi @teppo, yes had field named 'seo' of FieldtypeSeoMaestro assigned to a number of templates and publicly viewable pages
  9. psy


    Problem didn't go away for me. It still exists and no solution found. Turned off sitemap.xml generation to lose the error message. Still hoping for a fix
  10. Thanks @dragan will give it a try. Another idea I had was to use FormBuilder for the login form - again hackish. Really wish PW had a solid Login/Register module...
  11. psy

    Personal Website

    Nice 😀 home page nav was a bit confusing for me, eg when clicking on 'About', it scrolled to your About section but the menu disappeared. There was no obvious way to get back to the top of the page. When I scrolled up, the menu had disappeared. Using iMAC with wide screen. Going into phone mode in Chrome dev tools made it a bit easier... Otherwise, well done you!
  12. I want to have both a login form and a registration form on the same page. After much tweaking in CSS & Hooks, I managed to get @ryan's LoginRegister module to display as required. All goes well until it doesn't, ie if there is an error in the form submission. Each form has the wrapper ID hardcoded to "LoginRegister". Problem is when both forms are on the same page, both forms get the error messages and the Login form turns into a Register form. See attached before-and-after images and my code is in the 'spoiler'. Help to fix much appreciated
  13. psy


    Thanks @teppo realised I'd posted in the wrong forum and didn't know how to change it
  14. psy


    1. I'm getting the following error on a number of sites running PW3.0.142+ Failed to generate the XML sitemap Even though the API should have write access to the site root (unless something has changed in .htaccess?). I know others have raised this issue but I cannot figure it out. 2. The module default values do not parse PW vars while per page SeoMaestro fields do, eg in the field default Meta section: literally displays {title} in the browser tab. However if on a page seo override I uncheck the Inherit default value checkbox and enter: on page output, it correctly parses headline (1st priority) or page title (2nd priority) text in the browser tab. Help to fix both issues much appreciated.
  15. All good. Did you know about: $page->images->first and $page->images->last I often use $pages->images->last when client uploads images and wants the last one to display. To get really specific, you can call the image within a Pageimages array by calling the image by its index. Pageimages derives from WireArray which allows you to call an item by its index https://processwire.com/api/ref/wire-array/eq/
  • Create New...