Just installed Trongate V2 and followed the video tutorial "Build a Task Manager with Native PHP". After editing the Task controller adding function manage() with echo 'Hello'; in the body and writing "http://localhost/task_manager_app/tasks/manage" in the url I get the error:
class Tasks extends Trongate { public function manage() { echo 'Hello'; } }
Fatal error: Uncaught Error: Class "Tasks" not found in D:\xampp\htdocs\prova2\engine\Core.php:160 Stack trace: #0 D:\xampp\htdocs\prova2\engine\Core.php(71): Core->invoke_controller_method() #1 D:\xampp\htdocs\prova2\engine\Core.php(30): Core->serve_controller() #2 D:\xampp\htdocs\prova2\public\index.php(5): Core->__construct() #3 {main} thrown in D:\xampp\htdocs\prova2\engine\Core.php on line 160
any suggestion?
Configuration problem
4 months ago
4 months ago
#1
4 months ago
#2
Don't worry. I'm sure that's an easy fix. See if any of these work:
1). Make sure you do not have a 'controllers' directory inside your module. So, the Tasks.php file should just live directly at the module level.
2). If that doesn't work, make sure Tasks.php has an uppercase 'T' in the filename.
Please let us know if any of these work.
DC
1). Make sure you do not have a 'controllers' directory inside your module. So, the Tasks.php file should just live directly at the module level.
2). If that doesn't work, make sure Tasks.php has an uppercase 'T' in the filename.
Please let us know if any of these work.
DC
4 months ago
#3
Thanks for Your reply. What You suggested is already in my code.
TASK_MANAGER_APP
...
modules
tasks
TASK_MANAGER_APP
...
modules
tasks
4 months ago
#4
Thanks for Your reply. What You suggested is already in my code.
TASK_MANAGER_APP
...
modules
tasks
Tasks.php
-------------------------
File Tasks.php
class Tasks extends Trongate {
public function manage() {
echo 'hello';
}
}
---------------------------
I tested the 'stallone' project I have in htdocs archive for V1 and
http://localhost/stallone/store_items/show/1 on Trongete V1 works fine
TASK_MANAGER_APP
...
modules
tasks
Tasks.php
-------------------------
File Tasks.php
class Tasks extends Trongate {
public function manage() {
echo 'hello';
}
}
---------------------------
I tested the 'stallone' project I have in htdocs archive for V1 and
http://localhost/stallone/store_items/show/1 on Trongete V1 works fine
4 months ago
#5
Okay. Don't worry. You'll be fine.
Two things:
1). Your problem has changed. Now, your problem is, "how do I upload my code to GitHub?".
I'd like you to figure out how to upload your code to GitHub, if you have not done so already. Then, give me a link to a GitHub repo where I can check out your code.
2). Also, if you're planning on posting code here, I highly recommend using the 'code' tags - with square brackets. Instructions are provided above the textarea when you post.
Let me know how you get on.
DC
Two things:
1). Your problem has changed. Now, your problem is, "how do I upload my code to GitHub?".
I'd like you to figure out how to upload your code to GitHub, if you have not done so already. Then, give me a link to a GitHub repo where I can check out your code.
2). Also, if you're planning on posting code here, I highly recommend using the 'code' tags - with square brackets. Instructions are provided above the textarea when you post.
Let me know how you get on.
DC
4 months ago
#6
If uploading to GitHub is a problem then don't worry.
I'm going to build a feature soon that will enable you to upload your code - including entire modules - so that it'll be easier for you to get help.
You should see that feature within the next seven days.
I'm going to build a feature soon that will enable you to upload your code - including entire modules - so that it'll be easier for you to get help.
You should see that feature within the next seven days.
4 months ago
#7
Hi guys,
Great suggestion, DC - look forward to the upload feature on the forum.
Just an obvious observation:
- The URL "http://localhost/task_manager_app/tasks/manage" doesn't make sense with the error message you shared.
'D:\xampp\htdocs\prova2' - did you set the BaseURL in config to `http://localhost/task_manager_app/` first, as `prova2' should not be in the error message > 'D:\xampp\htdocs\task_manager_app' should be, assuming `task_manager_app` is the folder name of your T2 app.
Great suggestion, DC - look forward to the upload feature on the forum.
Just an obvious observation:
- The URL "http://localhost/task_manager_app/tasks/manage" doesn't make sense with the error message you shared.
'D:\xampp\htdocs\prova2' - did you set the BaseURL in config to `http://localhost/task_manager_app/` first, as `prova2' should not be in the error message > 'D:\xampp\htdocs\task_manager_app' should be, assuming `task_manager_app` is the folder name of your T2 app.
4 months ago
#8
Hello,
With the Task manager controller file, I added this to the top on the file:
I did this so entry point without manage directs to manage. So I can just enter http://localhost/tasks/
With the Task manager controller file, I added this to the top on the file:
I did this so entry point without manage directs to manage. So I can just enter http://localhost/tasks/