I'm getting an error trying to do this. I did it twice just to be sure. I was already running the ext so I disabled it, deleted the data, and deleted it out of the files. Then I downloaded a fresh zip file and edited migrations/version_100.php as you said (I hope),primehalo wrote: ↑Wed Jan 02, 2019 10:02 pmThat is set in the migrations/version_100.php file:CarolC1 wrote: ↑Tue Jan 01, 2019 2:02 am Thank you so much for making this. We've had this on 3.0 and 3.1, and this new 3.2 version installed on the 3.2.5 test board is working great.
I would really like to be able to use the new User's Choice options, which are a really nice feature, but is there a way to make our installation default to 'No' in the ucp when Always Notify is set on User's Choice in the acp? Personally, I plan to opt for 'Yes' in my settings, but I don't know if everybody would.
Thanks again!You can change user_primenotify_always_send to false before installing.Code: Select all
public function update_schema() { return array( 'add_columns' => array( USERS_TABLE => array( 'user_primenotify_enable_post' => array('BOOL', true), 'user_primenotify_enable_pm' => array('BOOL', true), 'user_primenotify_keep_bbcodes' => array('BOOL', true), 'user_primenotify_always_send' => array('BOOL', true), ), ),
Code: Select all
public function update_schema()
{
return array(
'add_columns' => array(
USERS_TABLE => array(
'user_primenotify_enable_post' => array('BOOL', true),
'user_primenotify_enable_pm' => array('BOOL', true),
'user_primenotify_keep_bbcodes' => array('BOOL', true),
'user_primenotify_always_send' => array('BOOL', false),
),
),
);
}
Code: Select all
General Error
SQL ERROR [ mysql4 ]
Invalid default value for 'user_primenotify_always_send' [1067]
SQL
ALTER TABLE `****_users` ADD COLUMN `user_primenotify_always_send` tinyint(1) UNSIGNED DEFAULT '' NOT NULL
BACKTRACE
FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()
FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 997
CALL: trigger_error()
FILE: [ROOT]/phpbb/db/driver/mysql.php
LINE: 191
CALL: phpbb\db\driver\driver->sql_error()
FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 1064
CALL: phpbb\db\driver\mysql->sql_query()
FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 1272
CALL: phpbb\db\tools\tools->_sql_run_sql()
FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 549
CALL: phpbb\db\tools\tools->sql_column_add()
FILE: (not given by php)
LINE: (not given by php)
CALL: phpbb\db\tools\tools->perform_schema_changes()
FILE: [ROOT]/phpbb/db/migrator.php
LINE: 714
CALL: call_user_func_array()
FILE: [ROOT]/phpbb/db/migrator.php
LINE: 661
CALL: phpbb\db\migrator->run_step()
FILE: [ROOT]/phpbb/db/migrator.php
LINE: 400
CALL: phpbb\db\migrator->process_data_step()
FILE: [ROOT]/phpbb/db/migrator.php
LINE: 288
CALL: phpbb\db\migrator->try_apply()
FILE: [ROOT]/phpbb/db/migrator.php
LINE: 241
CALL: phpbb\db\migrator->update_do()
FILE: [ROOT]/phpbb/extension/base.php
LINE: 78
CALL: phpbb\db\migrator->update()
FILE: [ROOT]/ext/primehalo/primenotify/ext.php
LINE: 83
CALL: phpbb\extension\base->enable_step()
FILE: [ROOT]/phpbb/extension/manager.php
LINE: 190
CALL: primehalo\primenotify\ext->enable_step()
FILE: [ROOT]/includes/acp/acp_extensions.php
LINE: 213
CALL: phpbb\extension\manager->enable_step()
FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: acp_extensions->main()
FILE: [ROOT]/adm/index.php
LINE: 82
CALL: p_master->load_active()
UNSIGNED DEFAULT ''
) instead of a zero (UNSIGNED DEFAULT 0
). I have no idea why that would be happening.Code: Select all
SQL ERROR [ mysqli ]
Incorrect string value: '\xF0\x9F\xA4\x94\xF0\x9F...' for column `forum`.`phpbb_notifications`.`notification_data` at row 1 [1366]
SQL
INSERT INTO phpbb_notifications (item_id, notification_type_id, item_parent_id, notification_time, notification_read, notification_data, user_id) VALUES (138452, 37, 98789, 1553423894, 0, 'a:7:{s:17:\"prime_notify_text\";s:432:\"\n removed 🤔🤗😂 removed \";s:9:\"poster_id\";i:53;s:11:\"topic_title\";s:56:\" removed \";s:12:\"post_subject\";s:60:\"Re: removed \";s:13:\"post_username\";s:0:\"\";s:8:\"forum_id\";i:23;s:10:\"forum_name\";s:7:\" removed \";}', 2043)
BACKTRACE
FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()
FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 994
CALL: trigger_error()
FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()
FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 656
CALL: phpbb\db\driver\mysqli->sql_query()
FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 377
CALL: phpbb\db\driver\driver->sql_multi_insert()
FILE: [ROOT]/phpbb/db/sql_insert_buffer.php
LINE: 138
CALL: phpbb\db\driver\factory->sql_multi_insert()
FILE: [ROOT]/phpbb/notification/method/board.php
LINE: 276
CALL: phpbb\db\sql_insert_buffer->flush()
FILE: [ROOT]/phpbb/notification/manager.php
LINE: 383
CALL: phpbb\notification\method\board->notify()
FILE: [ROOT]/phpbb/notification/manager.php
LINE: 295
CALL: phpbb\notification\manager->add_notifications_for_users()
FILE: [ROOT]/phpbb/notification/manager.php
LINE: 266
CALL: phpbb\notification\manager->add_notifications()
FILE: [ROOT]/includes/functions_posting.php
LINE: 2324
CALL: phpbb\notification\manager->add_notifications()
FILE: [ROOT]/posting.php
LINE: 1457
CALL: submit_post()
phpbb_notifications
is utf8_bin<r><EMOJI seq="1f914">🤔</EMOJI></r>
. I'm not exactly sure what code is used to do this conversion so I'll have to look into it more, unless someone already familiar with this can clue me in, which would be awesome....Those are Emojis.
Code: Select all
/**
* Strip emojis from a string
*
* @param string $string The UTF8 string to be cleared
* @return string
* @access public
*/
public function vendor_ext_strip_emojis($string)
{
return preg_replace('/[\x{10000}-\x{10FFFF}]/u', "", $string);
}
<r><EMOJI seq="1f914">🤔</EMOJI></r>
before storing them into the database. Do you know what bit of code does that?Because here they have to be all "casted to INT".
Code: Select all
'user_primenotify_enable_post' => array('BOOL', true),
'user_primenotify_enable_pm' => array('BOOL', true),
'user_primenotify_keep_bbcodes' => array('BOOL', true),
'user_primenotify_always_send' => array('BOOL', true),
'user_primenotify_*' => array('BOOL', 1),