[RC] gn36 - version check notifier

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!
Get Involved
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
gn#36
Translator
Posts: 185
Joined: Fri Oct 13, 2006 1:16 pm
Contact:

[RC] gn36 - version check notifier

Post by gn#36 » Mon Feb 01, 2016 11:49 pm

Extension Name: gn36 - version check notifier
Author: gn#36

Extension Description: Periodically checks for updates of extensions and notifies admins if extensions are available. A check for phpBB updates is also planned. Notifications use the phpBB notification system, thus your usual notification methods are available.
Extension Version: 1.0.0-RC1

Requirements: No special requirements

Features:
Current features:
  • Notification if an extension update is available.
  • Notification if a phpBB update is available.
Planned features for future release:
  • Warning notification, if version check fails several times in a row
Screenshots:
Image Image

Demo: None, as it requires admin privileges and outdated extensions or phpBB. See Screenshots instead.

Known Bugs:
  • Jabber notifications do not work due to a phpBB Bug up to phpBB 3.1.9.
Extension Download: https://github.com/gn36/phpbb-ext-versi ... v1.0.0-rc1
Last edited by gn#36 on Tue May 10, 2016 11:11 am, edited 3 times in total.
German Support Team Member • http://www.phpbb.deMy Extensions in the CDBMy Extensions on Github • Contact with caos is inavoidable but no catastrophy if you keep an overview.

User avatar
3Di
Former Team Member
Posts: 13769
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [DEV] gn36 - version check notifier

Post by 3Di » Tue Feb 02, 2016 12:26 am

Well done, light and usefull. Easy life. :)
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3984
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [DEV] gn36 - version check notifier

Post by HiFiKabin » Wed Feb 03, 2016 12:02 pm

Changing the notification settings in the UCP gives the following error. Also Notification settings can no longer be accessed, resulting in the same error.
General Error
SQL ERROR [ mysqli ]

Duplicate entry 'gn36.versionchecknotifier.notification.type.base' for key 'type' [1062]

SQL

INSERT INTO phpbb_notification_types (notification_type_name, notification_type_enabled) VALUES ('gn36.versionchecknotifier.notification.type.base', 1)

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/phpbb/notification/manager.php
LINE: 953
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/phpbb/notification/type/base.php
LINE: 133
CALL: phpbb\notification\manager->get_notification_type_id()

FILE: [ROOT]/phpbb/notification/manager.php
LINE: 909
CALL: phpbb\notification\type\base->set_notification_manager()

FILE: [ROOT]/phpbb/notification/manager.php
LINE: 885
CALL: phpbb\notification\manager->load_object()

FILE: [ROOT]/phpbb/notification/manager.php
LINE: 561
CALL: phpbb\notification\manager->get_item_type_class()

FILE: [ROOT]/phpbb/notification/manager.php
LINE: 655
CALL: phpbb\notification\manager->get_subscription_types()

FILE: [ROOT]/includes/ucp/ucp_notifications.php
LINE: 43
CALL: phpbb\notification\manager->get_global_subscriptions()

FILE: [ROOT]/includes/functions_module.php
LINE: 674
CALL: ucp_notifications->main()

FILE: [ROOT]/ucp.php
LINE: 369
CALL: p_master->load_active()

User avatar
gn#36
Translator
Posts: 185
Joined: Fri Oct 13, 2006 1:16 pm
Contact:

Re: [DEV] gn36 - version check notifier

Post by gn#36 » Wed Feb 03, 2016 12:07 pm

Did you clear the cache? I had the same problem, but the reason for that was a stale cache.
German Support Team Member • http://www.phpbb.deMy Extensions in the CDBMy Extensions on Github • Contact with caos is inavoidable but no catastrophy if you keep an overview.

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3984
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [DEV] gn36 - version check notifier

Post by HiFiKabin » Wed Feb 03, 2016 12:11 pm

Just did a full uninstall/install. Purged the cache, and same error results

EDIT:- Purged the cache again, and its working. Strange

User avatar
gn#36
Translator
Posts: 185
Joined: Fri Oct 13, 2006 1:16 pm
Contact:

Re: [DEV] gn36 - version check notifier

Post by gn#36 » Wed Feb 03, 2016 2:22 pm

Oh, I just took another look at your error message. The "base" class shouldn't even get added at all, that is just the base class for the real notifications.

This should now be fixed, I removed the base class from the configuration. Please make sure you purge the extension before you replace it, otherwise you will have leftovers in the database.
German Support Team Member • http://www.phpbb.deMy Extensions in the CDBMy Extensions on Github • Contact with caos is inavoidable but no catastrophy if you keep an overview.

User avatar
david63
Registered User
Posts: 16167
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [DEV] gn36 - version check notifier

Post by david63 » Wed Feb 03, 2016 2:37 pm

gn#36 wrote:Please make sure you purge the extension before you replace it, otherwise you will have leftovers in the database.
Purging the cache will not remove anything from the database and in any event there is no need to manually purge the cache when enabling/disabling/deleting data for an extension as that is part of the process.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
gn#36
Translator
Posts: 185
Joined: Fri Oct 13, 2006 1:16 pm
Contact:

Re: [DEV] gn36 - version check notifier

Post by gn#36 » Wed Feb 03, 2016 2:46 pm

Purging the extension will, though, that is precisely the difference between disabling and purging an extension. ;)
Specifically, in this case, it will, among other things, remove the notification type entry for gn36.versionchecknotifier.notification.type.base, that should have never gotten into the db to begin with. Since I took that out of the extension, you should completely purge the extension before updating, otherwise those entries will be left in the db, even if the extension is ever purged again later.
German Support Team Member • http://www.phpbb.deMy Extensions in the CDBMy Extensions on Github • Contact with caos is inavoidable but no catastrophy if you keep an overview.

User avatar
david63
Registered User
Posts: 16167
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [DEV] gn36 - version check notifier

Post by david63 » Wed Feb 03, 2016 3:16 pm

And how do you "purge" an extension? There is no such option.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
gn#36
Translator
Posts: 185
Joined: Fri Oct 13, 2006 1:16 pm
Contact:

Re: [DEV] gn36 - version check notifier

Post by gn#36 » Wed Feb 03, 2016 4:32 pm

Sorry, I am using a translated phpBB, so maybe my assumption about the english name was wrong. What I meant is taking all necessary steps to completely uninstall and remove an extension from the board. For most extensions this would mean loosing all data (for example, you would have to recreate all rules in the board rules extension (at least so I assume), your "About us" page would be empty, permissions of my firstpostedit extension would be reset to defaults, ...).

On the command line, the command is extension:purge <vendor>/<extname>. This is the same as disabling the extension and then removing its data from the database (whatever the link is called in the ACP then, if it is not called "purge"). After that, it can be reinstalled with the updated extension.
German Support Team Member • http://www.phpbb.deMy Extensions in the CDBMy Extensions on Github • Contact with caos is inavoidable but no catastrophy if you keep an overview.

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3984
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [DEV] gn36 - version check notifier

Post by HiFiKabin » Wed Feb 03, 2016 4:43 pm

You mean "Disable" then "Delete Data"

I have done that to remove the previous version, then add the new version.

So far all is well with no errors thrown

Miri4ever
Registered User
Posts: 409
Joined: Sat Mar 07, 2015 11:18 am

Re: [DEV] gn36 - version check notifier

Post by Miri4ever » Wed Feb 03, 2016 7:15 pm

Very good extension. Often having problems finding the new updates over Github and those inside the database often not up to date with latest builds. So this exentsion could be really helpful I hope.
Homepage: Terra Oceanica

User avatar
gn#36
Translator
Posts: 185
Joined: Fri Oct 13, 2006 1:16 pm
Contact:

Re: [DEV] gn36 - version check notifier

Post by gn#36 » Wed Feb 03, 2016 8:06 pm

It will be as good as the information the extension authors or the customization db provides.

If they provide version check info, an announcement and a download url, you will get all this information in your notifications. For all extensions in the database here, this should work since the phpbb team provides the version information for all extensions present. If you get your extension somewhere else, it depends on the author of the extension. But since it is really easy to do, I am sure you can convince most authors to include it, if they don't do it yet.

For me, the most important thing is, that it is also independent of an account here. You can receive notifications about updates regardless, and you will receive notifications about all installed extensions, regardless of whether you subscribed to the extension in the database or not. So if you forget the subscription, it doesn't matter, you will receive a notification anyways.
German Support Team Member • http://www.phpbb.deMy Extensions in the CDBMy Extensions on Github • Contact with caos is inavoidable but no catastrophy if you keep an overview.

User avatar
null2
Registered User
Posts: 464
Joined: Wed Jan 20, 2010 11:03 am

Re: [DEV] gn36 - version check notifier

Post by null2 » Thu Feb 04, 2016 11:01 pm

There is a little error in English translation, file "global.php", in this line:

'UPDATE_AVAILABLE' => 'Update verfügbar',
Sorry for my bad english. I'm from USA.

User avatar
null2
Registered User
Posts: 464
Joined: Wed Jan 20, 2010 11:03 am

Re: [DEV] gn36 - version check notifier

Post by null2 » Thu Feb 04, 2016 11:25 pm

Translation to Portuguese-Brazil: https://www.sendspace.com/file/2ol588
Sorry for my bad english. I'm from USA.

Post Reply

Return to “Extensions in Development”