All times are saved in a UNIX timestamps, that's counting the amount of seconds from that exact date.
So the timestamp is not filled correctly and it's trying to format 0:
$this->user->format_date(0);
.$this->user->format_date(0);
.Just this.mrgoldy wrote: ↑Wed Jan 15, 2020 12:57 pm That's probably your timezone equivalent of 1 January 1970 00:00.
All times are saved in a UNIX timestamps, that's counting the amount of seconds from that exact date.
So the timestamp is not filled correctly and it's trying to format 0:$this->user->format_date(0);
.
Thanks for your help offer.
Sorry but, in my board (local) update to PHPBB v3.3.0 if I enable the EXT asap I try to read a post board crash and debug message appear...Naguissa wrote: ↑Wed Jan 15, 2020 3:23 pm
To replicate, you need:
1) phpBB 3.3.0
2) Download master from here: https://github.com/Naguissa/thanks_for_posts -- Master has router.yml corrected to be phpbb 3.3.0 compatible
3) Activate the extension
4) Login as UserA* and give thanks to any message of UserB* (thanks button is present on action bar, same as report, quote, etc)
5) Logout and login as UserB. In notifications, Thanks notifications are completely wrong (no data and date as 0 (1970-1-1 corrected to timezone).
*UserA and UserB are existing users in your board
Ticinoforum wrote: ↑Wed Jan 15, 2020 9:52 pm Sorry but, in my board (local) update to PHPBB v3.3.0 if I enable the EXT asap I try to read a post board crash and debug message appear...
The one that I put on my previous post.
So, I am not able to make point 4 because I do not have the possibility to press "Thanks"...
BTW: I try to complete remove the EXT and add it (clear of data)
Thanks
Ticinoforum wrote: ↑Tue Jan 07, 2020 6:46 pm Board at least start, but generate "fatal error" asap I try to read a topic/post.
This is the error:
Fatal error: Uncaught phpbb\notification\exception: NOTIFICATION_TYPE_NOT_EXIST in phpbb\notification\manager.php:915
Stack trace: #0 phpbb\notification\manager.php(951): phpbb\notification\manager->get_notification_type_id('gfksx.thanksfor...')
[...] and similar...
Thanks.
thanksforposts
) but you declare them with capitals: ThanksForPosts
. Changing the service definitions to lowercase for the notification types solved that issue for me.I have the exact same problem.Ticinoforum wrote: ↑Tue Jan 07, 2020 6:46 pm
Board at least start, but generate "fatal error" asap I try to read a topic/post.
This is the error:
Fatal error: Uncaught phpbb\notification\exception: NOTIFICATION_TYPE_NOT_EXIST in phpbb\notification\manager.php:915
Stack trace: #0 phpbb\notification\manager.php(951): phpbb\notification\manager->get_notification_type_id('gfksx.thanksfor...')
[...] and similar...
Thanks.
I also want to know how to fix 'notification type'.
Ticinoforum wrote: ↑Tue Jan 21, 2020 5:27 pm Dear @Naguissa,
I give you more hints:
My board was at version 3.2.8 and I update it to 3.3.0 (using the 3.2.8->3.3.0 automatic update pack), doing in this way, I had all the problems that I write in my post.
Today I make something different, I update just to 3.2.9, and everything works perfect, also notification.
Than I update to 3.3.0 (pack from 3.2.9 to 3.3.0) and now I am in your same situation: all works but notification as no data and point to nothing.
So, since the 3.2.9 all works and 3.3.0 made this "little" bug, maybe making a compare of the two version help to found problem.
All this experiment was made local (using EasyPHP Devserver 17) now on my online version I am at 3.2.9 and everything works fine.
Thanks!
Thanks for your post.Naguissa wrote: ↑Tue Jan 21, 2020 11:09 am To fix that error, you need to check phpbb_notification_types on DB. It has to have these records
notification_type_id --- notification_type_name --- notification_type_enabled
whatever --- gfksx.thanksforposts.notification.type.thanks --- 1
whatever --- gfksx.thanksforposts.notification.type.thanks_remove --- 1
(being whatever a number, depending on your install)
If notification_type_enabled field is 0 you should set it to 1.
If table is missing these records you should add them.
But IDK how it ended that way; I've switched on local and, following correct procedure, there's no problem with data.
Identified problems are:
- Routes deprecated on services.yml, already solved on repository master
- Empty notifications, still no clue why it happens. But at least it doesn't produce a fatal error....
Cheers!
Code: Select all
Ssql = 'SELECT * FROM ' . $this->notifications_table . ' WHERE notification_type_id = ' . (int) $this->notification_type_id . ' AND item_id = ' . (int) self::get_item_id($thanks_data);
Code: Select all
like this)