404 with copied code from docs Topic is solved
Moderators: ooffick, General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
- JurajB
- Joomla! Guru
- Posts: 627
- Joined: Fri Oct 02, 2015 3:28 pm
404 with copied code from docs
Hello!
I have copied code from
https://docs.joomla.org/J4.x:Developing ... _Site_Part
when I click "Hello World" in components this happens:
Component not found.
also
http://localhost/joomla/index.php?optio ... view=hello
is not found
Something wrong with my config? I use xampp 8.1.6
php 8.1.6
mariadb 10.8.3
I have copied code from
https://docs.joomla.org/J4.x:Developing ... _Site_Part
when I click "Hello World" in components this happens:
Component not found.
also
http://localhost/joomla/index.php?optio ... view=hello
is not found
Something wrong with my config? I use xampp 8.1.6
php 8.1.6
mariadb 10.8.3
- JurajB
- Joomla! Guru
- Posts: 627
- Joined: Fri Oct 02, 2015 3:28 pm
Re: 404 with copied code from docs
maybe its antivirus or something with my filesystem?
- JurajB
- Joomla! Guru
- Posts: 627
- Joined: Fri Oct 02, 2015 3:28 pm
Re: 404 with copied code from docs
Hello!
Please somebody test:
http://jurajbevilaqua.com/com_helloworld.zip
Instructions:
1. test in backend (admin) clicking onto Hello World! within components and see what happens
2. test this component in your joomla index.php file (frontend) with index.php?option=com_helloworld&view=hello
Thanks you very much!
Please somebody test:
http://jurajbevilaqua.com/com_helloworld.zip
Instructions:
1. test in backend (admin) clicking onto Hello World! within components and see what happens
2. test this component in your joomla index.php file (frontend) with index.php?option=com_helloworld&view=hello
Thanks you very much!
-
- Joomla! Hero
- Posts: 2897
- Joined: Fri Jul 05, 2013 10:35 am
- Location: Parts Unknown
Re: 404 with copied code from docs
The service provider should be in services/provider.php, not in services/provider/provider.php.
- JurajB
- Joomla! Guru
- Posts: 627
- Joined: Fri Oct 02, 2015 3:28 pm
Re: 404 with copied code from docs
Thanks SharkyKZ, I am sorry for that! I mess everything that I do not copy it seems.
Now the second problem appears:
When I click Hello World in backend > components this error appears:
404
View not found [name, type, prefix]: hello, html, Administrator
Now the second problem appears:
When I click Hello World in backend > components this error appears:
404
View not found [name, type, prefix]: hello, html, Administrator
-
- Joomla! Hero
- Posts: 2897
- Joined: Fri Jul 05, 2013 10:35 am
- Location: Parts Unknown
Re: 404 with copied code from docs
You have no views in backend. A view is included in the package but is not installed. You use src directory for code but the View folder is still in top level directory.
- JurajB
- Joomla! Guru
- Posts: 627
- Joined: Fri Oct 02, 2015 3:28 pm
Re: 404 with copied code from docs
why its not installed ?
they say:
they say:
Once the component is installed, click the "Components" section of the menu on the left of the admin panel. You should now see a new link under this section labelled "Hello World". This is the link detailed in the component's manifest file. If you click it, you should see the "Hello World" page.
-
- Joomla! Hero
- Posts: 2897
- Joined: Fri Jul 05, 2013 10:35 am
- Location: Parts Unknown
Re: 404 with copied code from docs
The View directory is not installed. It's in the wrong directory inside the ZIP package. You currently have these directories:
But your file list is this:
You need to move "View" so it's inside "src", alongside with "Controller".
Code: Select all
services
src
tmpl
View
Code: Select all
<files folder="admin/">
<folder>services</folder>
<folder>src</folder>
<folder>tmpl</folder>
</files>
- JurajB
- Joomla! Guru
- Posts: 627
- Joined: Fri Oct 02, 2015 3:28 pm
Re: 404 with copied code from docs
Thanks!
Working fine!
* solved
Working fine!
* solved
- JurajB
- Joomla! Guru
- Posts: 627
- Joined: Fri Oct 02, 2015 3:28 pm
Re: 404 with copied code from docs
hm the frontend isnt working
https://docs.joomla.org/J4.x:Developing ... _Site_Part
index.php?option=com_helloworld&view=hello
should be hello world
its
The requested page can't be found.
my actual zip file is here:
https://easyupload.io/9g935c
https://docs.joomla.org/J4.x:Developing ... _Site_Part
index.php?option=com_helloworld&view=hello
should be hello world
its
The requested page can't be found.
my actual zip file is here:
https://easyupload.io/9g935c
-
- Joomla! Hero
- Posts: 2897
- Joined: Fri Jul 05, 2013 10:35 am
- Location: Parts Unknown
Re: 404 with copied code from docs
No files are installed in frontend. Why did you remove this from the manifest:
?
Code: Select all
<files folder="site/">
<folder>src</folder>
<folder>tmpl</folder>
</files>
- JurajB
- Joomla! Guru
- Posts: 627
- Joined: Fri Oct 02, 2015 3:28 pm
Re: 404 with copied code from docs
probably some version conflict
now its working anyway
* solved
now its working anyway
* solved