[RC] Digests 3.2.7

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

Re: [RC] Digests 3.2.6

Post by MarkDHamill » Fri Jun 08, 2018 5:07 pm

This is odd. Did you previously have the digests mod installed for phpBB?

I retested in an English only environment and do not see this issue.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
Hippie459MN
Registered User
Posts: 882
Joined: Mon Oct 15, 2007 10:13 pm
Location: Minnesota, USA
Contact:

Re: [RC] Digests 3.2.6

Post by Hippie459MN » Fri Jun 08, 2018 5:09 pm

I am not seeing this issue either. Are you sure all of your files got uploaded?

LNA
Registered User
Posts: 3
Joined: Fri Jun 08, 2018 3:36 pm

Re: [RC] Digests 3.2.6

Post by LNA » Mon Jun 11, 2018 9:40 am

Hello,
I'll try to reinstall it, but I'm not very comfortable with Github.
When do you think you will release the new version 3.2.7 here ?
Thank you

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

Re: [RC] Digests 3.2.6

Post by MarkDHamill » Mon Jun 11, 2018 12:31 pm

Probably in a week or so. As I find bugs or make changes I publish them to GitHub. So you are right that 3.2.7 on GitHub is not yet really 3.2.7.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

LNA
Registered User
Posts: 3
Joined: Fri Jun 08, 2018 3:36 pm

Re: [RC] Digests 3.2.6

Post by LNA » Mon Jun 11, 2018 12:57 pm

Ok, thank you ! ;)

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

Re: [RC] Digests 3.2.6

Post by MarkDHamill » Thu Jun 14, 2018 5:31 pm

LNA wrote:
Fri Jun 08, 2018 3:41 pm
I've just installed 3.2.7 but I have an error message when I try to activate Digest : "phpbbservices_digests_page_url not found"
This happened to me yesterday too in the final phase of testing. All my tests on my development web server passed, but moving it to a live test server connected to the web with a fresh copy of phpBB 3.2.2 and it came up during enabling the extension.

I'll obviously look into it but I don't understand it. I suspect the problem is in the phpBB 3.2.2 code base and not something I'm doing.

Any extension authors on the thread that want to look into this, please do. It's pretty baffling and hard to debug. I've figured out where the error is being triggered, and here's the code from /phpbb/db/migration/tool/config.php. It's pretty clear that somewhere a database commit is not happening. My latest code is on GitHub.

Code: Select all

	public function update($config_name, $config_value)
	{
		if (!isset($this->config[$config_name]))
		{
			throw new \phpbb\db\migration\exception('CONFIG_NOT_EXIST', $config_name);
		}

		$this->config->set($config_name, $config_value);
	}
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

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

Re: [RC] Digests 3.2.6

Post by 3Di » Thu Jun 14, 2018 6:06 pm

Have a look at the API, you might use a different approach to check for the esistance of a config value.
https://area51.phpbb.com/docs/code/3.2. ... onfig.html

i.e.: https://area51.phpbb.com/docs/code/3.2. ... fsetExists
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

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

Re: [RC] Digests 3.2.6

Post by MarkDHamill » Thu Jun 14, 2018 7:47 pm

Mainly, I have been using the guidance with extensions for handling modules, schema changes and data changes, which is where the issue is. For data changes, I've been using this guidance:

https://area51.phpbb.com/docs/dev/3.1.x ... anges.html

So my code assumes this is the way these things should be done, but it means passing off responsibility for things like database commits to the underlying libraries. My guess is that's not what's happening correctly.

It's getting tripped up I think at this line, with config.update(). It has a dependency on release_3.2.1.php, which depends on a number of other migrations with release_3.0.2.php being where this was originally set.

https://github.com/MarkDHamill/digests/ ... ta.php#L52

This was originally a different config value but the issue still occurred. In the 3.2.6 branch, this was different:

https://github.com/MarkDHamill/digests/ ... ta.php#L54

Only 3 config variables get stored to the database which is not what happens in my development environment.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

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

Re: [RC] Digests 3.2.6

Post by 3Di » Thu Jun 14, 2018 9:57 pm

Reviewing all migrations again is a work in the true sense of the word. I know that there have been changes in version 3.2.3-rc1 already available, I would advise you to try it to see if things get right or you're always at the same point.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

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

Re: [RC] Digests 3.2.6

Post by MarkDHamill » Thu Jun 14, 2018 10:28 pm

Thanks. I assume the issue is something related to my code even though I am using the recommended approach. I would imagine not many extensions would be approved if they will not install on phpBB 3.2.2. I have not tried it in my test environment on the latest development version of phpBB. Seems a logical thing to try as it would at least suggest where the root of the issue lies.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

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

Re: [RC] Digests 3.2.6

Post by 3Di » Thu Jun 14, 2018 11:29 pm

As far as I know extensions to be validated must install/uninstall themselves without problems on the latest public version, this is a cause for immediate rejection otherwise. A simpler approach that would remove this inconvenience would be to simplify and group those migrations - at least for the version to be judged. Each migration must have a specific purpose, it means one for config, one for permissions, one for the user schema, one for the ACP module, one for the MCP module, etc., as you go along.

All migration-based

Code: Select all

	static public function depends_on()
	{
		return array('\phpbb\db\migration\data\v32x\v322');
	}
You will provide then your users with separate scripts to eventually convert data from previous phpBBs.

The migration history of this extension started badly at the time, I allowed myself to point it out etc... useless to talk about it again.

If it doesn't work with 3.2.3-rc1 or even better the last snapshot of 3.2.3 is clearly a problem in your code. And as I said, to get our hands on those migrations is, especially for those who have not written them and do not know your logic, a real delirium.

You'll forgive me if I seem a little too blunt, you know that I never refused to try to help anyone.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

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

Re: [RC] Digests 3.2.6

Post by MarkDHamill » Sat Jun 16, 2018 12:46 am

Okay, I think I got the migration issues finally sorted out. At least it passes all my tests now. Thanks to all for reporting bugs and suggesting fixes. Hopefully I'll have a formal 3.2.7 release out shortly. My latest fixes are here.

The issue amounted to the convert_*.php programs that were written make obsolete the other release_*.php programs in the migrations folder. In addition, there was a lot of cleanup in general in these programs because if you try to fix issues in these programs that crept in over time, when you do a delete data you reintroduce some of these problems, since it simply reverses your fixes. Very puzzling to figure out. Also, bugs in 3.2.2 migrator such as in module.if() caused issues, so I just decided not to use them. Basically, be simpler rather than try to manage all the complexity of things like configuration variables that were introduced in one version then removed in another.

In retrospect I should not have bothered to try to port the data over from the 3.0 mod as it added a lot of hassle and not many users seemed to need the feature.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

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

Digests 3.2.7 Released

Post by MarkDHamill » Sat Jun 16, 2018 2:09 am

Digests version 3.2.7 is released. See the first post for links.

Change log:
Bug fixes:

- Fixed HTML5 validation issue with Edit Subscribers, closing </textarea> was missing
- Fixed HTML5 validation issue with Balance Load, added three <col> tags
- UCP dialog error fixed by adding additional code to jQueryUI interface
- Moved posts are not included in a digest
- Configuration variable phpbbservices_digests_strip_tags added by the migratior, was missed from earlier version

Changes in functionality:

- When the manual mailer is run, the file name includes a hash for added security

Extension team review fixes:

- Replaced isset($_REQUEST['config']) with $this->request->is_set('config')
- Replaced addslashes($balance) with $this->db->sql_escape($balance)
- Removed !defined('IN_PHPBB') in mailer
- Moved code to load messenger class inside the mail_digests function in cron/task/digests.php

Best practices:

- Replaced sizeof() with count() as sizeof() is an alias of count()
- Removed redundant conditional operators where unnecessary
- Removed unneeded casting of function return values where unnecessary
- Used $html_messenger->assign_var() when only one template variable needed to be set instead of $html_messenger->assign_vars()

CSS:

- Included ACP and UCP .css file through a switch, so they would not be loaded by other modules
- Edit subscribers now shows alternating row colors properly

Javascript:

- Included ACP and UCP .js file through a switch, so they would not be loaded by other modules
- Fixed some variable names that were not using camelcase
- addToStack() function logic now uses jQuery
- Removed redundant conditional operators where unnecessary
- Added var in front of variables that did not use them-

ACP Interface:

- Removed query for f_list privilege, unneeded
- Used constants DIGESTS_DAILY_VALUE, DIGESTS_WEEKLY_VALUE and DIGESTS_MONTHLY_VALUE instead of literals
- Properly indented code in templates

UCP Interface

- Properly indented code in templates

services.xml

- helper class is no longer passed to main_listener class as it is no longer needed

html_messenger.php

- Brought copied functions up to date with functions in version 3.2.2 of /includes/functions_messenger.php

Migrations

- Lots of work to simplify and address issues, some related to bugs in the migrator introduced in phpBB 3.2.2
- Conversion from digests mod: now properly converts configuration variables, modules and schema changes during enabling the extension if these remain in the database after upgrading from phpBB 3.0. This allows digest settings to be retained. Apparently this functionality never worked on phpBB 3.2. To get around what look like migrator bugs in phpBB 3.2.2, old modules are deleted with a direct database call. Note: if AutoMOD was used to install Digests, you need to remove AutoMOD modules manually. The symptom is an ACT_CAT_MOD tab appears in the ACP.
- Updates configuration variable to point to new digests web page URL
- Helper container removed as it is no longer needed
- release_3_0_6.php removed
- common.php linkage removed as it is not used anymore
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

Post Reply

Return to “Extensions in Development”

Who is online

Users browsing this forum: canonknipser and 16 guests