[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!
Ideas Centre
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
whaus
Registered User
Posts: 3
Joined: Thu Feb 20, 2014 1:52 pm

Re: [RC] Digests 3.2.6

Post by whaus »

MarkDHamill wrote: Thu Mar 15, 2018 8:56 pm I assume you are trying to retain the settings from an install of the digests mod for phpBB 3.0?

If it's not important follow my steps for clearing away Digests settings a couple of posts back and try a fresh install.
hi!
We experienced the same problem trying to retain the settings from an old install after an upgrade of phpBB. clearing the digests settings did not help.

this did:
* In phpbbservices/digests/migrations/release_3_0_2_data.php
* and in phpbbservices/digests/migrations/convert_mod_data.php
there seems to be an error regarding the initialization of the variable $helper. it seems to need parameters (to receive the board time zone) which are not there.

we did not try to add the correct parameters, but instead we commented out the variable init and then set the digests time zone setting to 0:
array('config.add', array('phpbbservices_digests_time_zone', 0)),


links:
https://github.com/MarkDHamill/digests/ ... ta.php#L33

and
https://github.com/MarkDHamill/digests/ ... ta.php#L45
User avatar
MarkDHamill
Registered User
Posts: 4885
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC] Digests 3.2.6

Post by MarkDHamill »

Thanks. I'll take a look at this.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4885
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC] Digests 3.2.6

Post by MarkDHamill »

I will need to set up a complete migration test again, but this may fix the issue. In /core/common.php after:

Code: Select all

		$this->language = $language;
add:

Code: Select all

		$this->helper = $helper;
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
Papa J
Registered User
Posts: 14
Joined: Thu Mar 08, 2018 4:07 pm

Re: [RC] Digests 3.2.6

Post by Papa J »

Thanks for the code, Mark. I'll be ready to try it later this p.m. I've been driving myself nuts by trying to make the new 3.2.2 install work by using your guidance on how to completely remove the old Digests. I finally reverted to 3.0.11, removed all of the mods, cleaned up the database by hand as best I could, then used the stk. I now have an almost de-modified 3.0.11 installation that I'm going to use to do a fresh 3.2.2 install, then add Digests 3.2.6. Probably should have done that to start, since the only data I needed to keep was the users' posts to the board.

One question: despite my best efforts, I still ended up with about 4 Digests related tabs in the UCP, and .Mod in the ACP. I assume I should run those down before applying more changes?
User avatar
MarkDHamill
Registered User
Posts: 4885
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC] Digests 3.2.6

Post by MarkDHamill »

You can delete these modules manually after the upgrade or via the database by removing rows from the phpbb_modules table. The migrator used to clean these out when the extension was installed.

If you clean everything out when you install the digest extension you will lose all the old subscribers settings.

Sorry for the issues.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
Papa J
Registered User
Posts: 14
Joined: Thu Mar 08, 2018 4:07 pm

Re: [RC] Digests 3.2.6

Post by Papa J »

The vast majority of the issues I faced came from (I think) my failure to keep updated, then trying to take short cuts in prepping for a whole set of updates. It feels now like I'm getting close, because the results are consistent over attempts. We love the extension, having used it since the board was set up in 2005 or 6. If we can just get this last bit solved, maybe my client/board owner/wife will let me out of the garage :lol:

Any way, here's what I've done and the results:

1-Reverted to phpBB 3.0.11
2-Disabled and removed all extensions and mods that I could find, including Digests. Loss of data not a problem.
3-Used STK to clean up the database
4-Checked for/removed remnants per your instructions for fixing a bad install
5-Uploaded a fresh set of phpBB 3.2.2 files, successfully ran database update
6-Disabled and removed a few leftovers
7-Uploaded fresh set of Digests 3.2.6 files to /ext
8-Tried to enable Digests, error
9-Cleaned up database, added line to /core/common.php thus:

public function __construct(\phpbb\language\language $language)
{
$this->language = $language;
$this->helper = $helper;
}

10-Tried to enable Digests, got the same error:

Catchable fatal error: Argument 1 passed to phpbbservices\digests\core\common::__construct() must be an instance of phpbb\language\language, none given, called in /home2/holisti2/public_html/migrate/ext/phpbbservices/digests/migrations/release_3_0_2_data.php on line 33 and defined in /home2/holisti2/public_html/migrate/ext/phpbbservices/digests/core/common.php on line 27

Database Contents
phpbb_ext: phpbbservices/digests line present

phpp_config: _dgests_show_forum_path, 0
_digests_max_cron_hrs, 0
_digests_lowercase_digest_type, 0

phpbb_users: no digest related columns

php_migrations: digests\migrations\release _3_0_2_da...
digests\migrations\convert_mod_modules
digests\migrations\release _3_0_2_mo...
digests\migrations\release _3_0_5
digests\migrations\release _3_0_6
digests\migrations\release _3_0_7
digests\migrations\release _3_2_1
digests\migrations\convert_mod_sche...
digests\migrations\convert_mod_data

phpbb_modules: UCP_DIGESTS_ADDITIONAL_CRITERIA
UCP_DIGESTS_BASICS
ACP_DIGESTS_RESET_CRON_RUN_TIME
UCP_DIGESTS_POST_FILTERS
UCP_DIGESTS_FORUMS_SELECTION
ACP_DIGESTS_TEST
UCP_DIGESTS
ACP_CAT_DIGESTS
ACP_DIGESTS_GENERAL_SETTINGS
ACP_DIGESTS_USER_DEFAULT_SETTINGS
ACP_DIGESTS_EDIT_SUBSCRIBERS
ACP_DIGESTS_BALANCE_LOAD
ACP_DIGESTS_MASS_SUBSCRIBE_UNSUBSCRIBE

I also tried to use whaus' workaround, but I really don't know anything about php programming, so I doubt I did it right. Results were pretty much as above any way. Any help greatly appreciated. We're holding off a hard relaunch of the website until we can offer Digests. It's a truly marvelous way for subscribers to stay abreast of their specific interests on a board that covers a lot of topics.

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

Re: [RC] Digests 3.2.6

Post by MarkDHamill »

On a fresh install of phpBB 3.2.2, does the unmodified version of Digests 3.2.6 install? I of course tested this before releasing it and had no issues, but the convert* programs in the migrations folder don't get run because there is nothing to convert.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
Papa J
Registered User
Posts: 14
Joined: Thu Mar 08, 2018 4:07 pm

Re: [RC] Digests 3.2.6

Post by Papa J »

Just reran the enable function with an original copy of the /core/common.php file. Same results :cry: I'm going to try the modified file again.
Papa J
Registered User
Posts: 14
Joined: Thu Mar 08, 2018 4:07 pm

Re: [RC] Digests 3.2.6

Post by Papa J »

I just reran the enable function with the edited /core/common.php file and got the following error message:

Parse error: syntax error, unexpected 'now' (T_STRING) in /home2/holisti2/public_html/migrate/ext/phpbbservices/digests/core/common.php on line 75

The database content results were the same as before, including removing pretty much all of the Digests related database content when I clicked "delete data" for Digests in the Extension Manager, EXCEPT a row for "phpbbservices_digests_time_zone" appeared in the phpbb_config table!
I tried to be very careful about going to the end of the table, but it might have been lurking just off the bottom of the page in phpMyAdmin. I get the same error message if I try to run "enable with the time zone row still in place, but the time zone row disappears, only to reappear when I delete data using the Extensions Manager. And I thought we were making progress! :oops:
User avatar
MarkDHamill
Registered User
Posts: 4885
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC] Digests 3.2.6

Post by MarkDHamill »

Does the digest extension work when installed on a fresh copy of phpBB 3.2.2?

It really sounds like you missed removing digest trapping from the database referenced in my earlier posts. Again:

- SELECT * FROM `phpbb_migrations` WHERE `migration_name` LIKE '%digest%' should return 0 rows. Delete any that show up.
- SELECT * FROM `phpbb_config` WHERE `config_name` LIKE '%digest%' should return 0 rows. Delete any that show up.
- The phpbb_users table should have no columns like user_digest*. Drop any that exist.
- SELECT * FROM `phpbb_ext` WHERE `ext_name` LIKE '%digest%' should return 0 rows. Delete any that show up.
- SELECT * FROM `phpbb_modules` WHERE `module_langname` LIKE '%DIGESTS%' should return 0 rows. Delete any that show up.
- Purge the cache
- Delete everything in the ext/phpbbservices/digests folder
- Upload a fresh copy of Digests 3.2.6
- Enable the extension
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
Papa J
Registered User
Posts: 14
Joined: Thu Mar 08, 2018 4:07 pm

Re: [RC] Digests 3.2.6

Post by Papa J »

I deleted everything in my directory except /files, /store, /images, and config.php, then uploaded fresh copies of phpBB 3.2.2 and Digests 3.2.6. Then I searched using the queries you listed (thanks for yet another useful bit of info), plus visual inspection. Then I tested the board, purged, and tried to enable the extension. Same old error message. I'll try switching to my backup database and take it from the top in the morning. Bummer.
User avatar
MarkDHamill
Registered User
Posts: 4885
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC] Digests 3.2.6

Post by MarkDHamill »

I will do a new installation test and a new conversion from phpBB 3.0 test but it will take a few days. The latter is harder to do because I need a phpBB 3.0 test database. I used to have one I would load periodically. I hope I still have it somewhere.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
Papa J
Registered User
Posts: 14
Joined: Thu Mar 08, 2018 4:07 pm

Re: [RC] Digests 3.2.6

Post by Papa J »

Very bad news -- I did a totally fresh install of phpBB 3.2.2 using new files and a newly created from scratch database, uploaded fresh Digests 3.2.6 files, got the exact same results as yesterday. Same error message, same database entries. I even went to the cache folder and made sure it was empty before trying to enable Digests. I'll give it another shot with the edited file.
Papa J
Registered User
Posts: 14
Joined: Thu Mar 08, 2018 4:07 pm

Re: [RC] Digests 3.2.6

Post by Papa J »

More bad news :| I uploaded a whole new set of phpBB files, including the factory /ext, /store, /images, /files, and config.php, created a new database with a unique name and prefixes. No issues detected with the installation process. Then I uploaded an entire fresh set of Digests 3.2.6 files, edited the /core/common.php :

public function __construct(\phpbb\language\language $language)
{
$this->language = $language;
//$this->helper = $helper;
}

public function make_hour_string($hour, $user_dateformat)

made sure the cache was clear, then tried to enable the extension with all of the same results as this a.m. with an unedited file, which is the same as I have been getting. I've been wracking my brain for a possible explanation. The only things I've come up with: 1) we recently moved from Blue Host to HostGator, and 2) we're using PHP 5.4.45, and MySQL(i) 5.5.51-38.2. Any possibilities there? PHP 7.0 is available to us. Any chance that would help?

Hate being such a PITA noob. Anything I can do to help?
Papa J
Registered User
Posts: 14
Joined: Thu Mar 08, 2018 4:07 pm

Re: [RC] Digests 3.2.6

Post by Papa J »

Sorry, I did uncomment the added line before I ran it. Proof reading should be done before hitting "send" ;)
Locked

Return to “Extensions in Development”