Jump to content

Search the Community

Showing results for tags 'PagePathHistory'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 2 results

  1. Dear Communiy, My template basic-page does have URL segments activated. The segments are used to handle a different URL for the files attached. If a file is not found a Wire404Exception() is thrown. Sadly PagePathHistory does not handle it correctly (in my opinion) and old URLs no longer are redirected to the new ones. wire/modules/PagePathHistory.module:117 /** * Hook called upon 404 from ProcessPageView::pageNotFound * */ public function hookPageNotFound(HookEvent $event) { $page = $event->arguments[0]; // If there is a page object set, then it means the 404 was triggered // by the user not having access to it, or by the $page's template // throwing a 404 exception. In either case, we don't want to do a // redirect if there is a $page since any 404 is intentional there. if($page && $page->id) return; [...] The documentation makes sense here but is the opposite of the desired effect. Only solution for my problem was to disable the if-Statement, is there a better way to do this?
  2. Hi everyone, I want to use the core module PagePathHistory in a Processwire instance with multi-language URLs/page names activated through the core module LanguageSupportPageNames. From looking at that old Post by Ryan I was pretty sure that it should work without any problems and was surprised that actually it doesn't. PagePathHistory only saves entries to it's DB table when the page name in the main language changes, not when any of the other language names change. Looking at the code this is no suprise as PagePathHistory only hooks Pages::moved(), Pages::renamed() and Pages::deleted(), none of which would be triggered by a change in a language page name. Starry-eyed I started to implement the missing language-awareness in the module, how hard can it be, eh? ...pretty quickly it turned out that this isn't that simple, so I decided to first ask for some help and guidance. Does anyone maybe already work out a solution for this particular problem or something similiar? The problem with the implementation is that after saving a page with changes to language names, there still has to be a means of accessing the old names. For the default language name this is pretty simple because it's saved as $page->namePrevious. For language names the module would have to deposit the original names for later to build the PagePathHistory-URLs. I've been looking through all hookable functions in core classes/modules but haven't found the best place to hook into to implement this functionality. Does anyone have an idea where this would be done best? Any help is appreciated. Thanks a lot in advance Marc
×
×
  • Create New...