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.
/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);
}
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.Code: Select all
static public function depends_on()
{
return array('\phpbb\db\migration\data\v32x\v322');
}
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.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
cron/task/digests.php
that can be triggered if a table of contents is wanted in a digest. This is because the messenger class does not support the assign_var()
method of the request class. You can see the patch here.Code: Select all
Fatal error: Uncaught Error: Call to undefined method phpbbservices\digests\includes\html_messenger::assign_var() in /var/www/forum/ext/phpbbservices/digests/cron/task/digests.php:1048
Stack trace:
#0 /var/www/forum/ext/phpbbservices/digests/cron/task/digests.php(279): phpbbservices\digests\cron\task\digests->mail_digests(1532784788, -4)
#1 [internal function]: phpbbservices\digests\cron\task\digests->run()
#2 /var/www/forum/phpbb/cron/task/wrapper.php(104): call_user_func_array(Array, Array)
#3 /var/www/forum/phpbb/console/command/cron/run.php(125): phpbb\cron\task\wrapper->__call('run', Array)
#4 /var/www/forum/phpbb/console/command/cron/run.php(89): phpbb\console\command\cron\run->run_all(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/forum/vendor/symfony/console/Command/Command.php(242): phpbb\console\command\cron\run->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/for in /var/www/forum/ext/phpbbservices/digests/cron/task/digests.php on line 1048
post_text
are not shown correctly. Titles are instead shown correctly, also in the table of contents. Some examples of these not correctly shown characters: