Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 on blog posts #23

Open
Crispy1975 opened this issue May 21, 2016 · 27 comments
Open

404 on blog posts #23

Crispy1975 opened this issue May 21, 2016 · 27 comments

Comments

@Crispy1975
Copy link

With a plain blog install and after following the instructions (downloaded zip etc.), I am now getting a 404 on trying to view a post, or the main /blog/ URL. Is there a config setting for the routes that I am missing somewhere or is something wrong here? The admin for the blog seems to work as expected...

@daylightstudio
Copy link
Owner

It sounds like something is wrong. What version of FUEL are you running (master or develop branch) and have there been any modifications made or is it a fresh copy?

@Crispy1975
Copy link
Author

I thought I would test drive it today, downloaded the zip for master of both FuelCMS and the blog module.

@daylightstudio
Copy link
Owner

The develop branch has CI 3.0 and is more compatible with PHP 7.0 as an FYI.

@Crispy1975
Copy link
Author

We're running PHP 5.4 along with Apache 2.2 (FastCGI). I got Fuel running just fine and made a mini-news module based on the docs tutorials. All that worked, just the blog module is causing issues.

@daylightstudio
Copy link
Owner

The casing issues with the blog are setup to work with the develop branch at the moment and may be part of the problem you are experiencing. So references to require Base_module_model.php may need to be lower cased.

@Crispy1975
Copy link
Author

Yeah, I lower cased these and the blog module now works fine in the Fuel admin panel, I can add posts and all that just fine. Now just the 404 to fix. I will pull dev branch later and try against that.

@rizkyfirmansyah
Copy link

rizkyfirmansyah commented Jun 17, 2016

I had a same problem with this. When I install on my localhost, nothing's problem. Then, when I install to www.mysite.com, the www.mysite.com/blog was not found (404). Could anyone tell me what is wrong?

@daylightstudio
Copy link
Owner

Do you have the latest version of the Blog module?

@rizkyfirmansyah
Copy link

I don't know which version is the latest. I'm using module version of 1.1

@daylightstudio
Copy link
Owner

Have you pulled from the master branch recently?

@rizkyfirmansyah
Copy link

Yes I did pulled recently. There is no issue when I installed in localhost, but when in www.mysite.com/blog an error was encountered: Unable to locate the file: blog_posts_model.php
Then, I lowercased all in blog/models and it works. But, in www.mysite.com/blog is still 404.
Please help...

@daylightstudio
Copy link
Owner

OK... I think the issue may have had to do with the conditional comparing between Fuel versions. I've posted a fix to the master branch:
5dc2545

@rizkyfirmansyah
Copy link

rizkyfirmansyah commented Jun 21, 2016

I have replaced the model with your updated branch 5dc2545. But i'm still facing the same problem: Unable to locate the file: blog_posts_model.php

@squeegels
Copy link

Hi,

I've update the source code to the latest version and still receive the 404 page not found error. It works fine on local machine but gives error on the server

@daylightstudio
Copy link
Owner

What version of FUEL are you running (fuel/modules/fuel/config/fuel_constants.php has the FUEL_VERSION constant in it)?

@rizkyfirmansyah
Copy link

rizkyfirmansyah commented Jun 21, 2016

I'm running FUEL on the 1.3.2 version. Yes, It tells define('FUEL_VERSION', '1.3.2');

@daylightstudio
Copy link
Owner

I see the issue I think. You may need to lower case your model names in the fuel/modules/blog/models folder. GIT will not recognize these changes so you'll need to do the following if for your repos to recognize the change.
http://stackoverflow.com/questions/17683458/how-do-i-commit-case-sensitive-only-filename-changes-in-git

Or, I've pushed a fix to the master branch to try out. The develop branch is on CI 3 and all model, library and controllers are capitalized.

@rizkyfirmansyah
Copy link

rizkyfirmansyah commented Jun 22, 2016

I have replaced all my code to your master branch and lower cased my fuel/modules/blog/models folder, still it did not solve yet. I've also tried your develop branch but nothing's different.

When I tried to use different version of Fuel (1.4), i was facing another problem:
Message: Unable to locate the model you have specified: Guests_model

Oh God, i really stuck here.

@daylightstudio
Copy link
Owner

This sounds like its a casing issue with the file names of the models. In CI 3 all library, model and controller class file names need to first be capitalized. In 1.3.2, that is not the case. The blog module however did have the model names capitalized for the upcoming 1.4 release which can cause problems in server environments that are case sensitive.

@squeegels
Copy link

Yup definitely a casing issue. I had to make my controller files and model files lower case for it to work.

I thought the last update was supposed to fix this?

@rizkyfirmansyah
Copy link

Thanks squeegels and daylight. It solved when I make the controller files being lower case.

@Crispy1975
Copy link
Author

@daylightstudio you can tell git to not ignore case, if memory serves it should be...

git config --global core.ignorecase false

Remove the --global for the current repo.

@daylightstudio
Copy link
Owner

@Crispy1975 ... good to know. Thanks.

@valeria-melinte
Copy link

I'm facing the same problem. I've tried the solutions listed above, nothing worked for me. Anyone managed to solve the issue?

@daylightstudio
Copy link
Owner

@valeria-melinte What version of FUEL are you running? You may try changing the controller file names to be lower case.

@kristdev
Copy link

kristdev commented Sep 6, 2016

it's working fine when the controllers name are changed in lower case. that is the solution, thanks a lot!

@rikkouri
Copy link

rikkouri commented Sep 6, 2016

I can confirm that renaming the files in fuel/modules/blog/controllers/ to be all lower-case resolves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants