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

SEF urls are 404ing on Joomla HelloWorld example #11

Open
covbradley opened this issue Aug 3, 2022 · 4 comments
Open

SEF urls are 404ing on Joomla HelloWorld example #11

covbradley opened this issue Aug 3, 2022 · 4 comments

Comments

@covbradley
Copy link

covbradley commented Aug 3, 2022

Hi All. I'm working my way through the Joomla tutorials and have hit a dead end.

I've downloaded the zip file for the "21 Adding an Alias" step and have installed the component.

https://github.com/Stevec4/Joomla-HelloWorld/tree/master/21%20Adding%20an%20Alias

I've got a fresh installation of XAMPP, PHP and Joomla 4 running on Windows (downloaded July 2022) with the Cassiopeia template.

As soon as I turn on SEF urls in the Joomla global config, the hello world urls are 404ing.

The urls also look like this "/component/helloworld/goodbye-world" rather than "/helloworld/goodbye-world".

I've created a menu item with an alias of "messages" (as the tutorial does). So when I go to http://localhost/messages I get a list of the helloworld database records, all good. But clicking on each of them 404s.

If I click on the former non-SEF url, it works. "http://localhost/index.php?option=com_helloworld&view=helloworld&id=1".

I've renamed the "htaccess.txt" to ".htaccess" and have uncommented the RewriteBase / line. That's all I've done.

Please help. If I can't get this to work, ie, generating SEF urls from dB records, then I might as well give up using Joomla. I really like Joomla and was really enjoying learning it until I got to this stage.

See https://futureforestsnetwork.joomla.com/messages

@Stevec4
Copy link
Owner

Stevec4 commented Aug 3, 2022

I think it is a XAMMP / Windows issue. If I try on my local host (XAMMP) it fails but on my live server it works.

@covbradley
Copy link
Author

If I install the helloworld component on CloudAccess.net, exactly the same happens. So I'd rule out it being XAMMP.

But thanks for the response. I might look into using an XAMMP alternative to see if that helps.

@covbradley
Copy link
Author

Hi all.

I now have a working router on my Joomla 4 site.

The example I followed is here...

https://github.com/ceford/j4xdemos-com-mywalks

So it seems that the old way of routing (as described in the Joomla 3 documentation) doesn't work with Joomla 4. That would be very useful to know if you're trying to get SEF urls working on J4.

And here I was thinking it was an XAMMP / Windows / Apache error.

I hope this helps everyone else who gets stuck trying to do what I was doing.

All the best...

@Stevec4
Copy link
Owner

Stevec4 commented Aug 5, 2022

Sorry Steve
I didn't see your trying this on J4. There are so many changes with the advent of J4. Glad you got it working if you have adapted these lessons for J4 it would really help to post them I see a lot of folks struggling to update their components and modules for J4.

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

2 participants