[BETA] Filter by country - version 1.0.8

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!
Suggested Hosts
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
</Solidjeuh>
Registered User
Posts: 1732
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: [RC] Filter by country - version 1.0.5

Post by </Solidjeuh> » Sat Aug 03, 2019 9:04 pm

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

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

Re: [RC] Filter by country - version 1.0.5

Post by MarkDHamill » Sat Aug 03, 2019 9:22 pm

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>',
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
</Solidjeuh>
Registered User
Posts: 1732
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: [RC] Filter by country - version 1.0.5

Post by </Solidjeuh> » Sat Aug 03, 2019 9:45 pm

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

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

Re: [RC] Filter by country - version 1.0.5

Post by MarkDHamill » 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.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
</Solidjeuh>
Registered User
Posts: 1732
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: [RC] Filter by country - version 1.0.5

Post by </Solidjeuh> » Sat Aug 03, 2019 9:57 pm

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.

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

Re: [RC] Filter by country - version 1.0.5

Post by MarkDHamill » Sat Aug 03, 2019 10:09 pm

That's good. The .gz file is decompressed into the .mmdb file, which is the actual database.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
</Solidjeuh>
Registered User
Posts: 1732
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: [RC] Filter by country - version 1.0.5

Post by </Solidjeuh> » Sun Aug 04, 2019 1:28 pm

Okay still no problems so far. All perfect :D
are you keeping those changes: viewtopic.php?f=456&t=2513016&start=135#p15297301 ?

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

Re: [RC] Filter by country - version 1.0.5

Post by MarkDHamill » Sun Aug 04, 2019 1:46 pm

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.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
janus_zonstraal
Registered User
Posts: 3739
Joined: Sat Aug 30, 2014 1:30 pm

Re: [RC] Filter by country - version 1.0.5

Post by janus_zonstraal » Sun Aug 04, 2019 3:24 pm

Also no problems here :D
Sorry! My English is bat ;) !!!

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

Filter by country - version 1.0.6 released

Post by MarkDHamill » Sun Aug 11, 2019 11:44 pm

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.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
janus_zonstraal
Registered User
Posts: 3739
Joined: Sat Aug 30, 2014 1:30 pm

Re: [RC] Filter by country - version 1.0.6

Post by janus_zonstraal » Mon Aug 12, 2019 7:24 am

thanks
Sorry! My English is bat ;) !!!

Midway
Registered User
Posts: 22
Joined: Tue Dec 09, 2014 8:02 pm

Re: [RC] Filter by country - version 1.0.6

Post by Midway » 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

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

Re: [RC] Filter by country - version 1.0.6

Post by MarkDHamill » Mon Aug 12, 2019 12:18 pm

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.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
KlausiMaus
Registered User
Posts: 143
Joined: Sat Nov 15, 2014 4:55 pm

Re: [RC] Filter by country - version 1.0.6

Post by KlausiMaus » Sun Sep 01, 2019 6:15 pm

  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
Klaus (http://forum.kuhnert.ch/) :: Keep it simple, stupid :!:

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

Re: [RC] Filter by country - version 1.0.6

Post by MarkDHamill » Sun Sep 01, 2019 7:20 pm

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.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

Post Reply

Return to “Extensions in Development”