ngrmm Posted March 20, 2023 Share Posted March 20, 2023 I have a redirect problem with a page inside a multi language website and would like to have a look at the page path history of that page. But I get an error if I use this for example: https://processwire.com/api/ref/page-path-history/ $array = $pagePathHistory->getPathInfo($page); // Error: Undefined variable: pagePathHistory on line: 1 Exception: Call to a member function getPathInfo() on null on line: 1 How can I use the page-path-history class. Link to comment Share on other sites More sharing options...
BillH Posted March 21, 2023 Share Posted March 21, 2023 Do you have the Page Path History module installed (it's in the core modules)? Also, I think you should start by using getPathHistory(), and then getPathInfo() for information about a particular path. Link to comment Share on other sites More sharing options...
ngrmm Posted March 21, 2023 Author Share Posted March 21, 2023 yes it is installed. It is still giving this error Call to a member function getPathHistory() on null maybe it is because it's a backend module and has to be initialized on the frontend before? Link to comment Share on other sites More sharing options...
Robin S Posted March 22, 2023 Share Posted March 22, 2023 On 3/21/2023 at 5:58 AM, ngrmm said: would like to have a look at the page path history of that page You can view the path history when the page is open in Page Edit, on the Settings tab: And from the API: 2 Link to comment Share on other sites More sharing options...
ngrmm Posted March 22, 2023 Author Share Posted March 22, 2023 (edited) @Robin S thanks! Okay. The history is empty! my page names are /20years (default – language) /de/20Jahre (de – german second language) When I enter www.domain.com/20jahre the page shows up but in the default language. Is there any cache that I have to empty? Even if I add de:/20jahre in the backend, it does not work as it should. UPDATE: Or is it a problem to have a redirect url-name like the page name of the non default language? Edited March 22, 2023 by ngrmm Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now