Topic: Frog htaccess != Wolf htaccess ?

Hi guys,

I have a few sites using FrogCMS but on my latest site I've taken the plunge to the Wolf (very excited).  For some reason though, no matter which slug I hit I always see the homepage.  I'm using the same htaccess as my Frog sites and this new site is on the same server.

This wouldn't make sense to me, but is there any reason the htaccess would need to change from Frog to Wolf?

I've verified that each page is using the correct layout and that I'm echoing $this->content().

Any ideas?  Thanks for reading.

- Scratching my head.

Thumbs up

Re: Frog htaccess != Wolf htaccess ?

The wolf htaccess has changed now.

There were some changes made as parts of it were interfering with default pagination helpers (from what i remember).

So yeah, for any wolf sites you will need the latest wolf htaccess.

Edit: link to the issue on google code http://code.google.com/p/wolfcms/issues/detail?id=117

Last edited by snsmurf (2010-04-27 12:08)

Re: Frog htaccess != Wolf htaccess ?

When upgrading from Frog to Wolf CMS or even from Wolf -> Wolf, it is always best to replace all files. smile

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.

Re: Frog htaccess != Wolf htaccess ?

Sorry Martijn,in my previous attempt at creating this reply I accidentally reported your post. smile

Anyways, I figured out the issue with my htaccess.  I had this:
RewriteRule ^(.*)$ index.php?PAGE=$1 [L,QSA]

But needed this:
RewriteRule ^(.*)$ index.php?WOLFPAGE=$1 [L,QSA]


Why the change?  What happens if you decide to change the name?  Will you find and replace all occurrences of 'WOLF' in the code?  I think it's best to leave it generic, just an opinion.

One other thing, while I'm on the rant... why the poor man's cron?  It seems like a pretty obscure feature to add to the base package.

Last edited by slowgary (2010-05-01 22:46)

Thumbs up

Re: Frog htaccess != Wolf htaccess ?

It was changed because $_GET['page'] was more commonly used by people for pagination on articles / blog posts etc... and as a result it was conflicting.

Leaving it generic would be a bad idea IMO. As I said more people use ?page= pagination so changing it was easily for the best. Makes life easier for people as they wouldn't have to dig around trying to find out why it wasn't working.

6

Re: Frog htaccess != Wolf htaccess ?

While we're at it ... big_smile

slowgary wrote:

One other thing, while I'm on the rant... why the poor man's cron?  It seems like a pretty obscure feature to add to the base package.

The main reason being that the capacity to be able to schedule publication of pages was thought to be a "basic" feature for many users. You don't have to use it, of course. wink

Re: Frog htaccess != Wolf htaccess ?

Makes sense.  Thanks guys.

Thumbs up

Re: Frog htaccess != Wolf htaccess ?

To further Davids post, I'm led to believe some hosts don't always offer regular cron support (God knows why?!) so it's an attempt to give some kind of automation service to people.

Obviously it can't match up to a proper cron command but it's definitely better then nothing.

Re: Frog htaccess != Wolf htaccess ?

It doesn't seem necessary for page publication though, since you can just set a timestamp that the page should be made available, and if NOW() > PUBLISH_TIME then the page is shown.

I don't need cron very often for things I've done, just the occasional data import that might need to run daily or weekly.  As you've stated, most hosts offer access to schedule cron jobs.  The poor man's version still seems like an obscure feature.  I really like the wolfcms and would hate to see it end up bloated, although I don't think that will be the case.

Why not add a relational CSV library for hosts that do not offer database access? wink

Thumbs up

Re: Frog htaccess != Wolf htaccess ?

Page publication is only one example. While you yourself may not have a need for them, think of all the other uses cron jobs have, it gives you the ability to do these things.
I myself work at a web design company and would not like to count the number of times we've used cron jobs in every day websites.
While it is an obscure feature in the grand scheme of things, I agree, I think it does have potential and I don't think the code involved in running such feature will have any affect in making Wolf too bloated. Plus as the project goals state, it aims to stay lightweight so i think we're fine for now!

Although with regards to add CSV support, do you not think this would contradict what you just said about making wolf bloated?
As you probably know wolf uses the PDO layer and as far as I'm aware it doesn't support a CSV driver, so it would mean either:

A) Recoding the database interaction to another layer which would support databases and flat file CSV
B) Leaving PDO in for databases and adding extra code to support CSV database.

Neither are going to be worth while investments, and if they were it's going to start bloating Wolf which you just said you didn't want!
TBH if your host does not come with something as basic as database access, you want to be looking for a new host.

Re: Frog htaccess != Wolf htaccess ?

Sorry, my sarcasm didn't translate well through text.  That was exactly my point.

If I needed a database but my host didn't provide it, I would not look at the CMS to provide an abstraction layer to instead use relational CSV files.  The same is true for poor man's cron.  It seems a hackish solution to replace something that 99% of hosts provide.  If someone needed cron but didn't have it, I would expect THEM to put together a hackish solution.  I would not expect that the CMS just happened to have already done so.

It's moot in either case because, as you said, I don't need to use it.  It just raised an eyebrow, that's all.  A strange feature to see in a CMS that aims to be lightweight.

Anyways, I've taken this thread way off topic, sorry for that.  I do see the benefit now of renaming "PAGE" to "WOLFPAGE", it keeps it more of an internal variable with less of a chance of colliding with other's code.  Makes sense.  Keep up the great work all of you.

Thanks.

Thumbs up

Re: Frog htaccess != Wolf htaccess ?

slowgary wrote:

Sorry, my sarcasm didn't translate well through text.  That was exactly my point.

My bad, that's one problem with the internet!

Re: Frog htaccess != Wolf htaccess ?

I love threads like this... tongue

Anyway, though this has all been hashed out and this topic should really die out... I can't keep myself from adding this comment.

slowgary wrote:

If I needed a database but my host didn't provide it, I would not look at the CMS to provide an abstraction layer to instead use relational CSV files.  The same is true for poor man's cron.  It seems a hackish solution to replace something that 99% of hosts provide.  If someone needed cron but didn't have it, I would expect THEM to put together a hackish solution.  I would not expect that the CMS just happened to have already done so.

It's moot in either case because, as you said, I don't need to use it.  It just raised an eyebrow, that's all.  A strange feature to see in a CMS that aims to be lightweight.

I'm afraid I don't agree here for a number of reasons:

1) Many hosting providers (unfortunately) still don't allow people proper cron usage.

2) I've added CRON support. Not just poor-man's cron suppport.

3) The poor-man's cron support is really only about ten lines of code and potentially saves a lot of people a lot of grief.

4) Poor-man's cron support is turned off by default so it causes a couple of nanoseconds of overhead + the ten lines of code.

I find that quite acceptable don't you? smile

In any case, Wolf CMS won't be finished until I've decided there's no more code to remove. For now though, a couple of features will mean adding code like some of the security features.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.

Re: Frog htaccess != Wolf htaccess ?

mvdkleijn wrote:

2) I've added CRON support. Not just poor-man's cron support.

What do you mean by CRON support?


I actually have worked with basic hosting accounts that did not include CRON support, but then I've also worked with crappy local hosts that charged extra per month to enable MySQL.

Thumbs up

15

Re: Frog htaccess != Wolf htaccess ?

slowgary wrote:

What do you mean by CRON support?

I think he means ... CRON support. cool

Re: Frog htaccess != Wolf htaccess ?

I've seen that, but don't see anything that actually explains what that means.  I understand CRON, and one could always setup a CRON job to cURL a wolf plugin or other script.  Was there not "CRON support" before?  What has changed?

EDIT:  I did look at the changelog and the cron code, I just don't get it.  Is it just meant to log jobs?

Last edited by slowgary (2010-05-04 14:49)

Thumbs up

Re: Frog htaccess != Wolf htaccess ?

slowgary wrote:

I understand CRON, and one could always setup a CRON job to cURL a wolf plugin or other script.  Was there not "CRON support" before?  What has changed?

You could indeed setup a cron job to curl a wolf plugin. The main difference here is that Wolf supporting Cron means you only have to setup one Cron job.

Also, since plugins or the core is triggered to do their thing through the Observer system, you can log cron runs centrally. In future that can be expanded to log details, add security, whatever.

It also means you (as a plugin developer) don't have have to explain to the user how to setup cron and you can simply refer the administrator to Wolf's documentation.

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.