Page 10 of 22

Re: [RC] Filter by country - version 1.0.5

Posted: Sat Aug 03, 2019 9:04 pm
by </Solidjeuh>
The folder was deleted. I disabled the ext and deleted data. Then deleted all files. And upload the new version (completely new install). I deleted the folder now and went to the index. The folder is back, but no .gz file

Re: [RC] Filter by country - version 1.0.5

Posted: Sat Aug 03, 2019 9:22 pm
by MarkDHamill
That is strange and I can't explain it. But no errors showed up?

You might try going to the extension's settings or statistics page to see if that creates the database.

I added some exception logic, replacing line 163 of /core/common.php:

Code: Select all

		$p->extractTo($extension_store_directory);
with:

Code: Select all

		try
		{
			$p->extractTo($extension_store_directory);
		}
		catch (\Exception $e)
		{
			$this->phpbb_log->add(LOG_CRITICAL, $this->user->data['user_id'], $this->user->ip, 'LOG_ACP_FBC_EXTRACT_ERROR', false, array($database_gz_file_path, $extension_store_directory, $e->getCode()));
			return false;
		}
This requires adding this language variable in /language/en/info_acp_filterbycountry.php, after:

Code: Select all

	'LOG_ACP_FBC_DELETE_ERROR'				=> '<strong>Unable to delete %1$s. This may be due to insufficient permissions. Full public write permissions are needed.</strong>',
adding:

Code: Select all

	'LOG_ACP_FBC_EXTRACT_ERROR'				=> '<strong>Unable to extract %1$s to %2$s. An ā€œ%3$sā€ exception was thrown.</strong>',

Re: [RC] Filter by country - version 1.0.5

Posted: Sat Aug 03, 2019 9:45 pm
by </Solidjeuh>
I did the changes, but see no error anywhere.
Did another new install of the ext. I'm not seeing that error in server logs anymore.
But I don't think the cron already run...

It's getting late now, I report tomorrow :D

Re: [RC] Filter by country - version 1.0.5

Posted: Sat Aug 03, 2019 9:55 pm
by MarkDHamill
Thanks for your help. I assume the database downloaded.

I may need to move the event to create the database into the install process.

Re: [RC] Filter by country - version 1.0.5

Posted: Sat Aug 03, 2019 9:57 pm
by </Solidjeuh>
MarkDHamill wrote: ā†‘
Sat Aug 03, 2019 9:55 pm
Thanks for your help. I assume the database downloaded.

I may need to move the event to create the database into the install process.
I don't see a .gz file. Only:

Image

But all the other crons are running at the moment... so that's a good thing. Think that is fixed.

Re: [RC] Filter by country - version 1.0.5

Posted: Sat Aug 03, 2019 10:09 pm
by MarkDHamill
That's good. The .gz file is decompressed into the .mmdb file, which is the actual database.

Re: [RC] Filter by country - version 1.0.5

Posted: Sun Aug 04, 2019 1:28 pm
by </Solidjeuh>
Okay still no problems so far. All perfect :D
are you keeping those changes: viewtopic.php?f=456&t=2513016&start=135#p15297301 ?

Re: [RC] Filter by country - version 1.0.5

Posted: Sun Aug 04, 2019 1:46 pm
by MarkDHamill
I will be. But I'm realizing I need to move the logic to populate the MaxMind database inside the installer, and to remove it when deleting data for the extension. This should make a lot of the issues you are experiencing moot. So expect to see this in the next version.

Re: [RC] Filter by country - version 1.0.5

Posted: Sun Aug 04, 2019 3:24 pm
by janus_zonstraal
Also no problems here :D

Filter by country - version 1.0.6 released

Posted: Sun Aug 11, 2019 11:44 pm
by MarkDHamill
See the first post. Thanks for all your testing. Here's a summary of what's changed in 1.0.6, a release candidate:
  • When decompressing the Maxmind database, try/catch logic is now used so any exception is properly handled
  • The extension won't try to load the database without first testing if the file already exists
  • Logic to send an email to administrators when there is a serious database error was removed. This means the /language/en/email directory is no longer necessary. The reason I did this is because admins will get inundated with emails if this happens, as every board access will trigger an email.
  • Extension won't install if /store folder is not writable.
  • When you delete data for the extension, the /store/phpbbservices/filterbycountry folder and its contents including the Maxmind database are deleted.

Re: [RC] Filter by country - version 1.0.6

Posted: Mon Aug 12, 2019 7:24 am
by janus_zonstraal
thanks

Re: [RC] Filter by country - version 1.0.6

Posted: Mon Aug 12, 2019 9:37 am
by Midway
after a while I have this popup window that appears

http://pixupload.free.fr/upload/o4yxig_erreur.png

Re: [RC] Filter by country - version 1.0.6

Posted: Mon Aug 12, 2019 12:18 pm
by MarkDHamill
Midway wrote: ā†‘
Mon Aug 12, 2019 9:37 am
after a while I have this popup window that appears

http://pixupload.free.fr/upload/o4yxig_erreur.png
I doubt that is my extension unless some sort of exception is being returned saying the MaxMind database is unavailable. Since the database is local, you can check that it exists and is readable in the /store/phpbbservices/filterbycountry directory. Look for a .mmdb file. Deleting it might make the problem go away as it should get reloaded if it is not present when selecting either ACP option or you hit the index.

Re: [RC] Filter by country - version 1.0.6

Posted: Sun Sep 01, 2019 6:15 pm
by KlausiMaus
  1. There is following error
    [phpBB Debug] PHP Warning: in file [ROOT]/ext/phpbbservices/filterbycountry/controller/acp_controller.php on line 381: file_exists(): open_basedir restriction in effect. File(./../ext/phpbbservices/filterbycountry/flags/??.png) is not within the allowed path(s): (E:/www/vhosts/kuhnert.ch/;C:/Windows/Temp/)
    Seems there is no flag for unknown country


  2. Version check is not working

Re: [RC] Filter by country - version 1.0.6

Posted: Sun Sep 01, 2019 7:20 pm
by MarkDHamill
The first issue is due to how you have PHP configured. See:

https://stackoverflow.com/questions/184 ... owed-paths

Version check not working is a fair point. The following changes need to be made to composer.json:

Replace:

Code: Select all

            "filename": "3.2.json"
with:

Code: Select all

            "filename": "3.2.json",
            "ssl": true
Thank you for the feedback and I hope you get a chance to do additional testing.