[3.2][3.3][RC] Thanks for posts (and optional Tapatalk integration)

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
Ticinoforum
Registered User
Posts: 25
Joined: Sat Mar 02, 2019 9:19 pm

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Ticinoforum »

Naguissa wrote: Tue Jan 21, 2020 6:24 pm In your case, update was performed without disabling extension, right?
A major update has important changes and maybe they affect to this plugin, if not disabled.
Yes, I confirm...first time did not "disable" my extension!
But in second test, 3.2.8->3.2.9->3.3.0 I made "as per manual"!
So, I think that if you have spare time to checks difference between core files on 3.2.9 amd 3.3.0, maybe you understand better the "notify data" problem.
This because, I confirm again, with 3.2.9 all works fine with current master version of your ext.

Thanks.
Ticino Forum 4.0
ADMINISTRATOR
User avatar
Naguissa
Registered User
Posts: 498
Joined: Thu Mar 02, 2017 6:55 am
Location: Barcelona
Name: Naguissa
Contact:

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Naguissa »

Ticinoforum wrote: Tue Jan 21, 2020 9:22 pm
Naguissa wrote: Tue Jan 21, 2020 6:24 pm In your case, update was performed without disabling extension, right?
A major update has important changes and maybe they affect to this plugin, if not disabled.
Yes, I confirm...first time did not "disable" my extension!
But in second test, 3.2.8->3.2.9->3.3.0 I made "as per manual"!
So, I think that if you have spare time to checks difference between core files on 3.2.9 amd 3.3.0, maybe you understand better the "notify data" problem.
This because, I confirm again, with 3.2.9 all works fine with current master version of your ext.

Thanks.

No, I updated old local copy (probably 3.2.8, but maybe earlier) to 3.3.0 disabling all extensions and I had no problems.

It was performed in a linux system, so it's worse tolerating capitals, and even so it was performed flawlessly (leaving aside services.yml and empty notifications).

I have to test it on a Windows 10 (cheap chinese) tablet and a portable server, but I expect far less problems on that machine, as it doesn't distinct between leter cases.


I suspect about db migrations between 3.2.x and 3.3.x when extensions are not disabled. But that doesn't fit to phpbb migration rules...


But still, it doesn't solve the "empty notifications problem".

I have a fix idea: as notifications are called twice, one with data and other without, I can create a static object to store data and try use it on 2nd call. But I need some spare time, I will take it from wherever I can....
fans
Registered User
Posts: 6
Joined: Sat Jan 20, 2018 8:37 am

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by fans »

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)
I did this, and it was fine for a couple of days. Thank you for that!
But today I got a warning on the top of the screen:
[phpBB Debug] PHP Warning: in file [ROOT]/ext/gfksx/ThanksForPosts/notification/thanks.php on line 109: sizeof(): Parameter must be an array or an object that implements Countable

What is wrong again?
murrrphy
Registered User
Posts: 3
Joined: Fri Aug 04, 2017 8:59 am

THE ADMINS IGNORED MY REQUEST FOR ACCOUNT DELETION....

Post by murrrphy »

THE ADMINS IGNORED MY REQUEST FOR ACCOUNT DELETION....
Last edited by murrrphy on Thu Jun 03, 2021 7:11 am, edited 2 times in total.
Hysteriaa
Registered User
Posts: 37
Joined: Mon Jan 20, 2020 8:18 pm

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Hysteriaa »

Hysteriaa wrote: Tue Jan 21, 2020 7:59 pm
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!
Thanks for your post.

Can you help a bit?

At line 300, my file "--- gfksx.thanksforposts.notification.type.thanks" has the code

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);
That same file doesn't contain "notification_type_name" or " notification_type_enabled" (looked up using Ctrl F).

My file "--- gfksx.thanksforposts.notification.type.thanks_remove" doesn't contain any three of them (_id, _name, _enabled)

I have no clue what to add and where.
Can you give me the code (

Code: Select all

like this)
and the line number where I have to put it?
In both of the files? (if it has to be in both of the files)

Thank you in advance!
Is there already a solution for this anyway?
User avatar
Naguissa
Registered User
Posts: 498
Joined: Thu Mar 02, 2017 6:55 am
Location: Barcelona
Name: Naguissa
Contact:

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Naguissa »

Hysteriaa wrote: Wed Jan 22, 2020 9:50 am Is there already a solution for this anyway?

That fields need to be on database, phpbb_notification_types table, not any file.

About usage, classes inherit from <PHPBB_ROOT>/phpbb/notification/type/base.php , but can be used in any file of phpbb....
User avatar
Naguissa
Registered User
Posts: 498
Joined: Thu Mar 02, 2017 6:55 am
Location: Barcelona
Name: Naguissa
Contact:

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Naguissa »

murrrphy wrote: Wed Jan 22, 2020 9:00 am Just replace or edit this line, like this:

Code: Select all

return (is_array($thankers)) && (sizeof($thankers) == 1) && $this->user_loader ? $this->user_loader->get_avatar($thankers[0]['user_id']) : '';
You have to ensure, that $thankers is an array.
I've done that in local changes, but problem is that the class is created with no data, so it's NULL, and then count trows that warning.

It's a good practice ensure everything, but main problem happens before.

P.S.: Thanks for helping!
murrrphy
Registered User
Posts: 3
Joined: Fri Aug 04, 2017 8:59 am

THE ADMINS IGNORED MY REQUEST FOR ACCOUNT DELETION....

Post by murrrphy »

THE ADMINS IGNORED MY REQUEST FOR ACCOUNT DELETION....
Last edited by murrrphy on Thu Jun 03, 2021 7:11 am, edited 2 times in total.
Hysteriaa
Registered User
Posts: 37
Joined: Mon Jan 20, 2020 8:18 pm

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Hysteriaa »

Naguissa wrote: Wed Jan 22, 2020 10:16 am
Hysteriaa wrote: Wed Jan 22, 2020 9:50 am Is there already a solution for this anyway?

That fields need to be on database, phpbb_notification_types table, not any file.

About usage, classes inherit from <PHPBB_ROOT>/phpbb/notification/type/base.php , but can be used in any file of phpbb....
Yeah that's what I meant, sorry. My English isn't very good but I meant also in the database.

I only don't know what fields/codes (I don't know the right word because of my English) has to be added and where exactly.
Yes, in the database.. But I'm sure there is a exact place in the table, so that's what I meant with 'where exactly'.
User avatar
Naguissa
Registered User
Posts: 498
Joined: Thu Mar 02, 2017 6:55 am
Location: Barcelona
Name: Naguissa
Contact:

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Naguissa »

Hysteriaa wrote: Wed Jan 22, 2020 11:04 am Yeah that's what I meant, sorry. My English isn't very good but I meant also in the database.

I only don't know what fields/codes (I don't know the right word because of my English) has to be added and where exactly.
Yes, in the database.. But I'm sure there is a exact place in the table, so that's what I meant with 'where exactly'.
Database, table phpbb_notification_types

FIELDS:
notification_type_id --- notification_type_name --- notification_type_enabled


DATA (2 rows):
whatever --- gfksx.thanksforposts.notification.type.thanks --- 1
whatever --- gfksx.thanksforposts.notification.type.thanks_remove --- 1


If records are missing you have to set notification_type_id as one number not used yet.
Hysteriaa
Registered User
Posts: 37
Joined: Mon Jan 20, 2020 8:18 pm

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Hysteriaa »

Thank you so much!

It works perfect, no bugs or anything!
User avatar
mrx1983
Registered User
Posts: 8
Joined: Mon Dec 02, 2019 8:53 pm

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by mrx1983 »

i also tried to find the culprit, but i'm also a bit lost at the moment. it looks like it can access the nofification data within the function "users_to_query()" and after that in all the functions like "get_avatar()", "get_title()" etc. the notification data is not there. its gone. really strange, i wonder what could have changed between phpbb 3.2 and phpbb 3.3 that causes this.
fans
Registered User
Posts: 6
Joined: Sat Jan 20, 2018 8:37 am

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by fans »

Oh guys! There are so many problems with this extention. First I added rows to DB. After that I have changed /ext/gfksx/ThanksForPosts/notification/thanks.php. But anyway I still have the problem. I made a test “thanks” and now I got notification dated 01 jan 1970, which can’t be marked as read…
User avatar
Naguissa
Registered User
Posts: 498
Joined: Thu Mar 02, 2017 6:55 am
Location: Barcelona
Name: Naguissa
Contact:

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by Naguissa »

fans wrote: Thu Jan 23, 2020 2:07 pm Oh guys! There are so many problems with this extention. First I added rows to DB. After that I have changed /ext/gfksx/ThanksForPosts/notification/thanks.php. But anyway I still have the problem. I made a test “thanks” and now I got notification dated 01 jan 1970, which can’t be marked as read…
Yes, that's the problem I'm investigating....

And that's why this extension is marked as [3.2] compatible and not [3.2][3.3]....
User avatar
potku
Registered User
Posts: 980
Joined: Wed Dec 22, 2004 10:26 pm
Location: Tampere, Finland
Contact:

Re: [3.2][RC] Thanks for posts (and optional Tapatalk integration)

Post by potku »

Man, it's a tough job being an EXT developer... Kudos to you, Naguissa. :)

This EXT is very important to us, so we will wait for as long as it takes for this to be compatible with phpBB 3.3 before we upgrade our phpBB. Thanks for all your hard work. :)
Potku.net

"Before I speak, I have something important to say."

- Groucho Marx
Post Reply

Return to “Extensions in Development”