[Solar-talk] Re: [Solar-svn] Revision 3037 (a.k.a page black-list)
Paul M Jones
pmjones at paul-m-jones.com
Sat Mar 22 14:05:35 CDT 2008
On Mar 22, 2008, at 13:59 , Antti Holvikari wrote:
> On Sat, Mar 22, 2008 at 8:52 PM, Paul M Jones <pmjones at paul-m-jones.com
> > wrote:
>> Hi Antti -- must step out, but quick replies first:
>>
>>
>>> Ok, so I think we still have a problem. Actually two:
>>>
>>> 1. The black-list is for class names which means that
>>> Vendor_App_Base
>>> is different than Solar_App_Base. **Every** vendor that has a base
>>> app
>>> class needs to add that to the list **in addition** to
>>> Solar_App_Base.
>>> I suggest that the list is for page names. This way `base` covers
>>> 99%
>>> of the cases.
>>
>> Fair enough and good call, will change this later tonight or maybe
>> tomorrow.
>>
>>
>>
>>> 2. I'd very much prefer to have the error handling in a page
>>> controller than in the front itself. The front now just runs
>>> _notFound() which prints this simple 404 page. Instead, let the
>>> front
>>> run my default page controller and I'll then see what I can do with
>>> the request. This will most likely run _notFound() in the **page**
>>> controller, which actually makes perfect sense.
>>
>> As it is now, the front-controller *should* send all unrecognized
>> requests to the default controller. The only time _notFound() is
>> invoked is if the default controller can't be found. Is it not
>> behaving this way? I may have messed up the logic moving things
>> around.
>
> Ah, I see it now. My Vendor_App_Base is being chosen by
> _getPageClass(), this is why it never uses _default ($class is
> `true`).
>
> So, I think the solution is to check the blacklist in _getPageClass().
Well, there's a separate behavior that I just thought of, and that is
for "disabled" page names to use the default controller and that page-
name as the action.
For example, say your default is "something", and that the "base" name
is disabled. If a request is for "/base/foo/bar", that would then go
to "/something/base/foo/bar" and be handled by the "something"
_notFound(). That is, the default controller will receive all
"disabled" page names as if they were actions on the default
controller. (Hope that made sense.)
Does that seem like it might give you what you need?
-- pmj
More information about the Solar-talk
mailing list