National Flags

Error in version 2.1.4 - National Flags

Error in version 2.1.4

by null2 » Fri Feb 02, 2018 2:45 pm

Sometimes, I get this error (it repeats several times at top screen):

[phpBB Debug] PHP Warning: in file [ROOT]/ext/rmcgirr83/nationalflags/event/listener.php on line 579: in_array() expects parameter 2 to be array, null given
[phpBB Debug] PHP Warning: in file [ROOT]/ext/rmcgirr83/nationalflags/event/listener.php on line 579: array_keys() expects parameter 1 to be array, boolean given

Usually, pressing F5 will solve it.

I didnt have this error in 2.1.3.
Sorry for my bad english. I'm from USA.
User avatar
null2
Registered User
Posts: 516
Joined: Wed Jan 20, 2010 11:03 am
Contact:

Re: Error in version 2.1.4

by RMcGirr83 » Fri Feb 02, 2018 4:17 pm

null2 wrote:Sometimes, I get this error (it repeats several times at top screen):

[phpBB Debug] PHP Warning: in file [ROOT]/ext/rmcgirr83/nationalflags/event/listener.php on line 579: in_array() expects parameter 2 to be array, null given
means the cache for the users and flags isn't being generated.

Try this fix to that file

https://github.com/rmcgirr83/phpBB-3.1- ... ick_pull=1
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Error in version 2.1.4

by null2 » Sat Feb 03, 2018 5:54 pm

Doing that, I got an error 500 and blank screen.
Sorry for my bad english. I'm from USA.
User avatar
null2
Registered User
Posts: 516
Joined: Wed Jan 20, 2010 11:03 am
Contact:

Re: Error in version 2.1.4

by RMcGirr83 » Sun Feb 04, 2018 11:18 am

Then you didn't do the edit correctly.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Error in version 2.1.4

by null2 » Mon Feb 05, 2018 10:54 am

I think you were right. Now, its in test. I will let you know if it removed the bug.
Sorry for my bad english. I'm from USA.
User avatar
null2
Registered User
Posts: 516
Joined: Wed Jan 20, 2010 11:03 am
Contact:

Re: Error in version 2.1.4

by null2 » Wed Feb 07, 2018 8:17 pm

No problems anymore. I think its solved. Thank you!
Sorry for my bad english. I'm from USA.
User avatar
null2
Registered User
Posts: 516
Joined: Wed Jan 20, 2010 11:03 am
Contact:

Re: Error in version 2.1.4

by null2 » Thu Feb 08, 2018 1:13 pm

Same error today:

[phpBB Debug] PHP Warning: in file [ROOT]/ext/rmcgirr83/nationalflags/event/listener.php on line 581: in_array() expects parameter 2 to be array, null given
[phpBB Debug] PHP Warning: in file [ROOT]/ext/rmcgirr83/nationalflags/event/listener.php on line 581: array_keys() expects parameter 1 to be array, boolean given

It happened after I changed board language to English. After a F5, error disapeared.
Sorry for my bad english. I'm from USA.
User avatar
null2
Registered User
Posts: 516
Joined: Wed Jan 20, 2010 11:03 am
Contact:

Re: Error in version 2.1.4

by RMcGirr83 » Thu Feb 08, 2018 2:16 pm

Sorry, I'm not sure why that's happening. Can you paste in the data within the data_users_and_flags php file (not the lock file) found in the cache directory?
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Error in version 2.1.4

by null2 » Thu Feb 08, 2018 9:01 pm

Sorry for my bad english. I'm from USA.
User avatar
null2
Registered User
Posts: 516
Joined: Wed Jan 20, 2010 11:03 am
Contact:

Re: Error in version 2.1.4

by RMcGirr83 » Fri Feb 09, 2018 10:23 am

:shock: Your cache file is 2.5 MB's?!!!

How many users are on your forum and have chosen a flag?
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Error in version 2.1.4

by null2 » Fri Feb 09, 2018 6:10 pm

Right now, 220718 registered users. I believe 95+% of them set a flag.

My forum had more than 1,000,000 users but in December I made a cleaning to remove old ones. I left these ones who signed up once, at least, in the last 2 years.

===========

IN TIME: Error happened again today, but in line 601, just browsing forum.
Sorry for my bad english. I'm from USA.
User avatar
null2
Registered User
Posts: 516
Joined: Wed Jan 20, 2010 11:03 am
Contact:

Re: Error in version 2.1.4

by RMcGirr83 » Fri Feb 09, 2018 8:30 pm

That is for viewing the memberlist. I'm not sure why this is occuring but may have some suggestions for you to try.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Error in version 2.1.4

by null2 » Fri Feb 09, 2018 9:20 pm

It happened in version 2.1.4. In version 2.1.3 was ok.

I couldnt find a "logic reason" for these errors. They look like random.
Sorry for my bad english. I'm from USA.
User avatar
null2
Registered User
Posts: 516
Joined: Wed Jan 20, 2010 11:03 am
Contact:

Re: Error in version 2.1.4

by null2 » Fri Feb 09, 2018 9:38 pm

One more time today: https://s10.postimg.org/3up93vjtl/tela.jpg

I will return to version 2.1.3 for a while.
Sorry for my bad english. I'm from USA.
User avatar
null2
Registered User
Posts: 516
Joined: Wed Jan 20, 2010 11:03 am
Contact:

Re: Error in version 2.1.4

by RMcGirr83 » Sat Feb 10, 2018 3:35 pm

Well I would still like to figure out why this is happening.

Can you paste this sql command within phpmyadmin (CTRL + V if right click doesn't display paste command) and tell me how long the query takes to run and how many rows were returned

Code: Select all

SELECT user_id, user_flag FROM phpbb_users WHERE user_flag > 0 
you may need to change phpbb to be the proper prefix of the table in your database.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact: