ryan Posted October 8, 2021 Share Posted October 8, 2021 This week I kept working on what's been in progress the last couple of weeks. That wasn't really the plan, as I was hoping to move on to other parts of the core. But I found it a took a lot of time to adjust everything to the new code and classes, and to refactor and remove other chunks of code that could either be simplified or removed. So these last few weeks of updates took a lot more time than I expected, and it's one of those things where once I got into it I felt I had to keep working until it was done as well as it could be. That meant getting pretty deep into some core logic. So in hindsight I'm slightly regretting refactoring so much code without major short-term benefits that can make more interesting reading here. And there are perhaps some short-term drawbacks in potentially introducing new bugs, as goes with any new code. But that's how it is sometimes. The good news is that it's a definite improvement in quality and I have no doubt there will be long term benefits especially in terms of improved performance and maintainability. But in any case, I'm glad to be wrapping up these particular updates so that I can move on to other parts of the core and Pro modules, and hopefully I'll have more interesting stuff to write about next time. One small addition you might find useful in these updates is that you can now identify the closest matching page when a 404 occurs. Maybe you want to provide a hint to users that land on a 404 as to what page they might have been looking for. Now you can do this in your 404 page template file: $p = $pages->request()->getClosestPage(); if($p->id > 1) { echo "<p>Were you looking for <a href='$p->url'>$p->title</a>?</p>"; } Like last week I'm not bumping the dev branch core version just yet because I don't want to trigger any upgrade alerts that might prompt people to upgrade immediately. I'd rather focus more on testing and leave these updates to those that are interested in that testing, helping to track down any issues. Thanks in advance for your help with testing these updates. Likewise, thanks for reading, I hope you have a great weekend! 18 3 Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted October 8, 2021 Share Posted October 8, 2021 Great to see those core things evolving. Someone has to look after them. And we all know who that is)) 5 Link to comment Share on other sites More sharing options...
horst Posted October 9, 2021 Share Posted October 9, 2021 12 hours ago, Ivan Gretsky said: ... Someone has to look after them. And we all know who that is)) I don't (know) ? ?? 1 Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted October 10, 2021 Share Posted October 10, 2021 I was talking about Ryan. He is the one looking after the core (and everything really). Just wrote that post to let him know I am thankful he does. 2 Link to comment Share on other sites More sharing options...
horst Posted October 10, 2021 Share Posted October 10, 2021 5 hours ago, Ivan Gretsky said: I was talking about Ryan. He is the one looking after the core (and everything really). Just wrote that post to let him know I am thankful he does. Ooh. Than I've thought to complicated. ? 1 Link to comment Share on other sites More sharing options...
Jan Romero Posted October 10, 2021 Share Posted October 10, 2021 On 10/8/2021 at 10:35 PM, ryan said: I have no doubt there will be long term benefits especially in terms of improved performance and maintainability. A good feeling to have! Thank you for your tireless improvements to PW! 3 Link to comment Share on other sites More sharing options...
Christophe Posted October 11, 2021 Share Posted October 11, 2021 Thanks again also to Horst and to the other contributors. 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