It not add anything to Notifications_types table

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
mael
Registered User
Posts: 76
Joined: Wed Jan 11, 2017 1:21 am
Name: DANY

It not add anything to Notifications_types table

Post by mael »

I have been downloading extensions to check if i have any error with my code, but i cant find anything. All seens be right, but i dont know why my extension not add a new custom row in notification_types table. So the notifications not works cause of this. I uploaded my files here: https://github.com/maelsanchez/GroupTWO

Hope any expert can help me with that, i try everything. Its weird because i tryed installing anothers extension with notifications and it works but i cant see any error in my code :(
User avatar
mael
Registered User
Posts: 76
Joined: Wed Jan 11, 2017 1:21 am
Name: DANY

Re: It not add anything to Notifications_types table

Post by mael »

anyone? :(
User avatar
Steve
Registered User
Posts: 1480
Joined: Tue Apr 07, 2009 7:48 pm
Name: Steven Clark
Contact:

Re: It not add anything to Notifications_types table

Post by Steve »

Your function handle($e) is not assigned to a subscribed event. Have a look at the docs for extensions ;)
@ The Chief Medical Officers guideline for men is that: You are safest not to drink regularly more than 14 units per week.
- I drank that today++ :lol: 🍺
User avatar
mael
Registered User
Posts: 76
Joined: Wed Jan 11, 2017 1:21 am
Name: DANY

Re: It not add anything to Notifications_types table

Post by mael »

i forgot upload route.yml file to repository. So everything is fine there :(
User avatar
mael
Registered User
Posts: 76
Joined: Wed Jan 11, 2017 1:21 am
Name: DANY

Re: It not add anything to Notifications_types table

Post by mael »

btw i compare your post reactions extension with mine and i cant see any difference (awesome extension btw too :) ). Well, there are a difference i dont have a migrations files but idk if its cause of that.
User avatar
Steve
Registered User
Posts: 1480
Joined: Tue Apr 07, 2009 7:48 pm
Name: Steven Clark
Contact:

Re: It not add anything to Notifications_types table

Post by Steve »

Maybe's if you explain a bit more what you are trying to do we may be able to understand better.

I just noticed your main.php file is a controller so i will let you off on need it in a listener file with subscribed events as i was browsing on my mobile.

how does your extension intend on working and what does it do?
@ The Chief Medical Officers guideline for men is that: You are safest not to drink regularly more than 14 units per week.
- I drank that today++ :lol: 🍺
User avatar
mael
Registered User
Posts: 76
Joined: Wed Jan 11, 2017 1:21 am
Name: DANY

Re: It not add anything to Notifications_types table

Post by mael »

The extension add a little form where users can send images to share. But before save the image in database, the extension send a notification to admin so he can validate each image :)
User avatar
Steve
Registered User
Posts: 1480
Joined: Tue Apr 07, 2009 7:48 pm
Name: Steven Clark
Contact:

Re: It not add anything to Notifications_types table

Post by Steve »

Where's the rest of the code for submitting the form data ?

//edit i hacked your files a bit, changing all variables in main.php, images.php and fixing some other files for it to be recognised as an extension.

if you vistit app.php/images/1

a notification will be sent to user_id 2
@ The Chief Medical Officers guideline for men is that: You are safest not to drink regularly more than 14 units per week.
- I drank that today++ :lol: 🍺
User avatar
mael
Registered User
Posts: 76
Joined: Wed Jan 11, 2017 1:21 am
Name: DANY

Re: It not add anything to Notifications_types table

Post by mael »

Wow thanks! i have been checking what was the issue with your example and i just should change the name extension to lower case :).

Tho idk why it not works with uper case letters if my controller and listener works perfectly with that? So with notifications i must create an name extension with lower case letters only :)
User avatar
Steve
Registered User
Posts: 1480
Joined: Tue Apr 07, 2009 7:48 pm
Name: Steven Clark
Contact:

Re: It not add anything to Notifications_types table

Post by Steve »

Your extension wasn't recognised on my server due to the uppercasing of your directorys and namespaces. So I'd use only lowercase if I were you 👍🏻
@ The Chief Medical Officers guideline for men is that: You are safest not to drink regularly more than 14 units per week.
- I drank that today++ :lol: 🍺
User avatar
mael
Registered User
Posts: 76
Joined: Wed Jan 11, 2017 1:21 am
Name: DANY

Re: It not add anything to Notifications_types table

Post by mael »

Yeah, i will do that many thanks! cheers! :D
Post Reply

Return to “Extension Writers Discussion”