[CDB] Digests 3.2.11

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)
Locked
User avatar
3Di
Former Team Member
Posts: 13686
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [RC5] Digests 3.0.6

Post by 3Di » Sun Oct 16, 2016 2:59 am

MarkDHamill wrote:3Di, if this approach is acceptable to Praggle I can leave the official digests archive with English only. It will speed things up a little. In the past I've found unless the translator is available it's impractical to keep up to date translations as versions change too quickly than all translators can create timely translations.
Github'd translations have been proofed to be a PITA for us.
It's not in our duties, at the end of all.

Translators can easily post a link to where their work it's available to be downloaded, else..
like others already do..
open an own github account and upload there all of their translations, ext by ext.
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 | 👨‍🏫

craigj
Registered User
Posts: 8
Joined: Tue Jun 23, 2015 12:41 pm

Re: [RC5] Digests 3.0.6

Post by craigj » Tue Oct 18, 2016 2:57 pm

I tried to upgrade to digests_3.0.6 but have an issue. Here are the steps that I followed:

1. Disabled previous version of Digests (I believe it was 3.0.0 or 3.0.1)
2. Deleted ext/phpbbservices/digests directory
3. Uploaded ext/phpbbservices/digests directory from the digests_3.0.6 download
4. Extension manager now reports current version as "3.0.6-RC5"
5. Press "Enable" and I receive the following error message:
Something went wrong during the request and an exception was thrown. The changes made before the error occurred were reversed to the best of our abilities, but you should check the board for errors.

Several modules with the given parent module langname already exist: UCP_DIGESTS. Try using before/after keys to clarify the module placement.

Return to the extension list
After receiving this error message, I decided to press "Delete data" and then try to press "Enable" again, but it didn't help.

Are you able to suggest anything that I can do next to get past this issue? I am running phpBB 3.1.10.

User avatar
MarkDHamill
Registered User
Posts: 3790
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Digests 3.0.6

Post by MarkDHamill » Tue Oct 18, 2016 8:44 pm

That is an old version.

First, disable digests if that's possible. If not run this SQL in phpMyAdmin (change the table prefix if necessary):

Code: Select all

DELETE FROM phpbb_ext WHERE ext_name = 'phpbbservices/digests'
Then try running this SQL (change the table prefix if needed):

Code: Select all

DELETE FROM `phpbb_modules` WHERE `module_langname` LIKE '%DIGEST%'
and

Code: Select all

DELETE FROM `phpbb_config` WHERE `config_name` LIKE '%phpbbservices_digest%' 
also drop any columns in the phpbb_users table that start with user_digest.

That should delete all the database data. Purge the cache. Then enable digests again. It should appear uninstalled.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

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

Re: [RC5] Digests 3.0.6

Post by 3Di » Wed Oct 19, 2016 12:56 am

Migrations, I know I am stressing this point but I knew.
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 | 👨‍🏫

craigj
Registered User
Posts: 8
Joined: Tue Jun 23, 2015 12:41 pm

Re: [RC5] Digests 3.0.6

Post by craigj » Wed Oct 19, 2016 8:54 am

Hi Mark,

I followed all of the steps you mentioned above:

* Disabled the plugin
* Ran DELETE FROM phpbb_ext WHERE ext_name = 'phpbbservices/digests'
* This deleted 0 rows
* Ran DELETE FROM `phpbb_modules` WHERE `module_langname` LIKE '%DIGEST%'
* This deleted 0 rows
* Ran DELETE FROM `phpbb_config` WHERE `config_name` LIKE '%phpbbservices_digest%'
* This deleted 0 rows
* Inspected phpbb_users table but didn't find any columns starting with "user_digest".
* Purged the cache
* Tried to enable extension 3.0.6-RC5
* Received the same error.

Is there anything else I can try?

Edit: I'm not sure why the queries above didn't work, but I decided to delete the phpbbservices/digests directory, manually inspect the phpbb_modules and phpbb_config tables and found a load of rows relating to the digests, so I manually deleted those. I also manually deleted the row from the phpbb_ext table and dropped the appropriate columns from the phpbb_users table. I then purged the cache.

I then re-uploaded the phpbbservices/digests directory and pressed "Enable". Unfortunately I now get the following error message:
Something went wrong during the request and an exception was thrown. The changes made before the error occurred were reversed to the best of our abilities, but you should check the board for errors.

A required module does not exist: ACP_CAT_DIGESTS

Return to the extension list

User avatar
MarkDHamill
Registered User
Posts: 3790
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Digests 3.0.6

Post by MarkDHamill » Wed Oct 19, 2016 8:04 pm

3Di, yes, experience is a great teacher.

craigj, yes, I can confirm that disabling and deinstalling 3.0.6-RC5 fails. I get:
Something went wrong during the request and an exception was thrown. The changes made before the error occurred were reversed to the best of our abilities, but you should check the board for errors.

A required module does not exist: UCP_DIGESTS

Return to the extension list
It's probably due to something I coded wrong in migration/release_3.0.6.php. I was trying to fix a permissions bug that I introduced in an early version where those that upgraded from the digests mod had UCP digests permissions set so that only admins could see the UCP digests interface. I'm hoping 3Di and others can review my code and let me know what I did wrong. I paste it below:

Code: Select all

<?php
/**
*
* @package phpBB Extension - Digests
* @copyright (c) 2016 Mark D. Hamill (mark@phpbbservices.com)
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

namespace phpbbservices\digests\migrations;

if (!defined('IN_PHPBB'))
{
	exit;
}

class release_3_0_6 extends \phpbb\db\migration\migration
{
	
	static public function depends_on()
	{
		return array(
			'\phpbbservices\digests\migrations\release_3_0_5',
			'\phpbb\db\migration\data\v31x\v319',
		);
	}

	public function update_data()
	{
		return array(

			// Need to fix an issue introduced by those who "upgraded" from the phpBB 3.0 digests modification using the effectively_installed
			// function prior to version 3.0.4. It limited digests UCP access to those with admin privileges only. Oops.
			
			// Temporarily get rid of the four digest UCP modules...
			array('module.remove', array(
				'ucp',
				'UCP_DIGESTS',
				array(
					'module_basename'       => '\phpbbservices\digests\ucp\main_module',
					'modes'                 => array('basics', 'forums_selection', 'post_filters', 'additional_criteria'),
				)
			)),
			// then its module category
			array('module.remove', array(
				'ucp',
				0,
				'UCP_DIGESTS',
			)),
		
			// Now put them back in but with the right authorization this time
			array('module.add', array(
				'module_class'		=> 'ucp',
				'module_basename'	=>	false,	// 0, or top level
				'module_langname'	=> 'UCP_DIGESTS',
				'module_auth'       => 'ext_phpbbservices/digests',
			)),
			array('module.add', array(
				'ucp', 
				'UCP_DIGESTS', 
				array(
					'module_basename'   => '\phpbbservices\digests\ucp\main_module',
					'modes' => array('basics', 'forums_selection', 'post_filters', 'additional_criteria'),
				),
			)),
						
		);
	}
}
It and the other migration programs can be seen here:

https://github.com/MarkDHamill/digests/ ... migrations

When I checked the database afterward it crashed trying to remove the UCP modules for digests so none of the other migration steps happened. I was able to delete them in the database using the SQL I provided, reinstall 3.0.6-RC5 but uninstalling it triggered the error.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

craigj
Registered User
Posts: 8
Joined: Tue Jun 23, 2015 12:41 pm

Re: [RC5] Digests 3.0.6

Post by craigj » Thu Oct 20, 2016 2:42 pm

Thanks Mark. Any assistance from you or others to get this back up and running on my board would be appreciated.

Praggle
Registered User
Posts: 64
Joined: Thu Feb 26, 2015 6:07 pm

Re: [RC5] Digests 3.0.6

Post by Praggle » Thu Oct 20, 2016 7:54 pm

3Di wrote:
MarkDHamill wrote:3Di, if this approach is acceptable to Praggle I can leave the official digests archive with English only. It will speed things up a little. In the past I've found unless the translator is available it's impractical to keep up to date translations as versions change too quickly than all translators can create timely translations.
Github'd translations have been proofed to be a PITA for us.
It's not in our duties, at the end of all.

Translators can easily post a link to where their work it's available to be downloaded, else..
like others already do..
open an own github account and upload there all of their translations, ext by ext.
For me everythink is okay. You should choose a way that motivates new users to start new translations and to complete or edit existing translations. And it should be easy for you to transfer it into the master branch. It might be a new discussion thread, new github-account oder just a new repository or an unmerged branch. I like to work directly into github but it should be as easy as possible for new translators and for yourself.

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

Re: [RC5] Digests 3.0.6

Post by 3Di » Fri Oct 21, 2016 12:04 am

Best is (for those they like to use github) to open an own account there and fork just the language files, translate them (organised extension by extension) and link the users to the button to click to obtain the package.
Simple, very simple as it is.

Option 2:
once the extension has been validated there could be a Topic (like many of us are used to create on purpose) where the translation packs links can be posted and assistance given.

@ Mark:
I suggest you again, as I already did many times, to take your time and re-code your migration files. Each file for a purpose (ACP, UCP, MCP and the likes), easy maintenable and the best way to do it is to forget UMIL and code them the "modern way". So to speak.

If you need any help you know you can post there into the devoted forum for writers, I will be more than glad to take a look and help.

Debugging the whole migrations thinghy of yours right now needs a big gap of time I really I do not have, since I am not using nor I will your extension for my own needs.

Suggesting to start from the scratch (yes!) with them, understanding and reading once again that given documentation.

Regards.
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 | 👨‍🏫

Praggle
Registered User
Posts: 64
Joined: Thu Feb 26, 2015 6:07 pm

Re: [RC5] Digests 3.0.6

Post by Praggle » Fri Oct 21, 2016 6:07 am

3Di wrote:Best is (for those they like to use github) to open an own account there and fork just the language files, translate them (organised extension by extension) and link the users to the button to click to obtain the package.
Simple, very simple as it is.

Option 2:
once the extension has been validated there could be a Topic (like many of us are used to create on purpose) where the translation packs links can be posted and assistance given.
Sounds good!

@Mark: Can you open that new account, when you make changes to the language files?

Praggle

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

Re: [RC5] Digests 3.0.6

Post by 3Di » Fri Oct 21, 2016 6:15 am

@ Praggle..
I know sometimes I can't be exhaustive as I would like to be due to the language barrier but..

YOU should open a new your owned account there then fork the repo/(language/s) etc.. etc..

If you need more help I could link you to a github account (of a known translator) where you can see how all of this works. :)

Regards.
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
MarkDHamill
Registered User
Posts: 3790
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Digests 3.0.6

Post by MarkDHamill » Fri Oct 21, 2016 2:18 pm

craigj wrote:Thanks Mark. Any assistance from you or others to get this back up and running on my board would be appreciated.
Based on my testing, digests 3.0.6 should run as install correctly and I believe send digests correctly without duplicates. It's the uninstalling that fails and it has something to do with release_3.0.6.php.

I finally got a review from the extensions team. They noted that the effectively_installed() function in release_3.0.2.php is performing logic that should be in ext.php. I will move it all in there. I think trying to patch an inadvertent error I introduced in an early version of the extension is a mistake and those few affected should probably just manually fix the permissions issue.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
MarkDHamill
Registered User
Posts: 3790
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Digests 3.0.6

Post by MarkDHamill » Fri Oct 21, 2016 2:23 pm

3Di wrote:@ Mark:
I suggest you again, as I already did many times, to take your time and re-code your migration files. Each file for a purpose (ACP, UCP, MCP and the likes), easy maintenable and the best way to do it is to forget UMIL and code them the "modern way". So to speak.

If you need any help you know you can post there into the devoted forum for writers, I will be more than glad to take a look and help.
I agree. The migration from 3.0 will move into ext.php per the requirements of the extension review team. I'll review the migrations Wiki again, something of a deep dive for me.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
MarkDHamill
Registered User
Posts: 3790
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Digests 3.0.6

Post by MarkDHamill » Fri Oct 21, 2016 2:25 pm

Praggle wrote:
3Di wrote:
MarkDHamill wrote:For me everythink is okay. You should choose a way that motivates new users to start new translations and to complete or edit existing translations. And it should be easy for you to transfer it into the master branch. It might be a new discussion thread, new github-account oder just a new repository or an unmerged branch. I like to work directly into github but it should be as easy as possible for new translators and for yourself.
Praggle I appreciate your translations. It will make it easier to separate non British English translations from my official archive so I will remove language/de in the next version. I hope that you will continue to monitor language changes to the extension and publish these changes in an appropriate area of your own GitHub account.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

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

Re: [RC5] Digests 3.0.6

Post by 3Di » Fri Oct 21, 2016 7:18 pm

MarkDHamill wrote:
3Di wrote:@ Mark:
I suggest you again, as I already did many times, to take your time and re-code your migration files. Each file for a purpose (ACP, UCP, MCP and the likes), easy maintenable and the best way to do it is to forget UMIL and code them the "modern way". So to speak.

If you need any help you know you can post there into the devoted forum for writers, I will be more than glad to take a look and help.
I agree. The migration from 3.0 will move into ext.php per the requirements of the extension review team. I'll review the migrations Wiki again, something of a deep dive for me.
Here you'll find the Dev Docs for 3.1 up to date, forget the Wiki.
https://area51.phpbb.com/docs/dev/31x/index.html

See expecially https://area51.phpbb.com/docs/dev/31x/m ... ncies.html

On a side note, this bit of code is not necessary

Code: Select all

if (!defined('IN_PHPBB'))
{
   exit;
}
and must be removed.

To add, just the first migration file depend on the release migration of the minimum phpBB requirement of your extension.

Code: Select all

   static public function depends_on()
   {
      return array(
         '\phpbb\db\migration\data\v31x\v319',
      );
   }
and not all the others, then the first depends on what I above said, the second depend on the first, like.. assuming the first file is 3_0_0 and the second is 3_0_1

Code: Select all

   static public function depends_on()
   {
      return array(
         '\phpbbservices\digests\migrations\release_3_0_0',
      );
   }
and so on..
Last edited by 3Di on Fri Oct 21, 2016 8:13 pm, edited 1 time in total.
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 | 👨‍🏫

Locked

Return to “Extensions in Development”