Recently Browsing 0 members
No registered users viewing this page.
currently Iam working on a website for one of my clients and I need some advice on how to approach this in PW.
The website is for a company, that offers holiday houses in two locations.
The client wants the homepage to show the first location. Normally I just have a home template for the first page, but here the URL should reflect that you are in Location 1. So when you visit the URL casamani.com it should redirect to casamani.com/location-1. Not sure if this makes sense at all.
Whould it be bad for SEO and performance reasons to redirect home to the Location-1 page?
Another approach would be to render the Location-1 template on the home template or do an include like discussed here.
Here is how the tree looks:
– Location 1 (Homepage)
– Location 2
Thanks for looking into this!
PW version 3.0.123
I've recently tried to upgrade the Blog module in an installation from 2.4.0 to 2.4.5 and now get the following errors when trying to visit Blog > Posts in admin:
Fatal Error: Uncaught Error: Call to a member function count() on null in /MYSITE/site/modules/ProcessBlog/ProcessBlog.module:1299 Stack trace: #0 /MYSITE/site/modules/ProcessBlog/ProcessBlog.module(1421): ProcessWire\ProcessBlog->renderItemsSummaries(Object(ProcessWire\PageArray)) #1 /MYSITE/site/modules/ProcessBlog/ProcessBlog.module(1989): ProcessWire\ProcessBlog->renderItemsList(Object(ProcessWire\PageArray)) #2 /MYSITE/wire/core/Wire.php(380): ProcessWire\ProcessBlog->___executePosts() #3 /MYSITE/wire/core/WireHooks.php(723): ProcessWire\Wire->_callMethod('___executePosts', Array) #4 /MYSITE/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessBlog), 'executePosts', Array) #5 /MYSITE/wire/core/ProcessController.php(333): ProcessWire\Wire->__call('executePosts', Array) #6 /MYSITE/wire/core/Wire.php(380): ProcessWire (line 1299 of /MYSITE/site/modules/ProcessBlog/ProcessBlog.module) This error message was shown because: you are logged in as a Superuser. Error has been logged. I can see posts in Blog > Dashboard and all seems to work still on the front end.
Anyone else seen this or know of a fix?
addHookBefore('Session::redirect', ...) not working if template-settings-based PW redirects are usedBy theoretic
Hi guys and ladies! And thanks for Processwire!
It appears i've got an interesting issue concerning the template-settings-based PW redirects dealing with access control. Any PW template has some access control options i.e. "Login redirect URL or page ID to render". If this option is used for a page having a template with this option filled, a redirect will occur if user is not logged in and/or has insufficient access rights.
I like to hook PW events. In one of my current projects i decided to write an addHookBefore('Session::redirect', ...) which should store the page we are being redirected from. With "regular" redirects like $session->redirect('/somewhere/') this hook works like a charm. But it was strange to see that it doesn't work with the template-settings-based redirect.
I'm too dumb to dive deep inside PW and to examine the whole PW session mechanism. But it could be rather logical if ANY redirect ( no matter template-settings-based or using $session->redirect() ) could be hooked in the same manner.
Okay okay i can forget about template-settings-based redirect and write my own. Just a couple of lines of code, and it works. But it's less elegant than hooking the template-settings-based redirects.
So am i missing something? It this behavior a bug, or is it intended by PW team? Thanks in advance for any comment!
By Greg Lumley
Hi! I'm busy building a blog into my first test/learning/free/clients/project 😁
I've had a look at all the blog examples and there seem to be different ways of doing it. (the point of Processwire, I know)
It seems this is generally how it's done:
Master Blog Page
- Blog Post Child Page
- Blog Post Child Page
- Blog Post Child Page What I'm particularly interested in is the Categories. What would you advise?
I think I've even seen Categories set up as Children of a master Category page too. The pages were hidden containing no
What would you recommend?
Bare with me, I'm bashing my way through while I learn.