National Flags

Array sizes are inconsistent - National Flags

Array sizes are inconsistent

by 69bruno » Tue Sep 08, 2020 12:38 pm

Hello,

I installed nationalflags, deleted all the flags. After this, the button "add new flag" didn't work anymore.
So I put my standard flag in the db for the button to work.

I succeeded and could add new flags. But I got this message of mistake:
"[phpBB Debug] PHP Warning: in file [ROOT]/ext/rmcgirr83/nationalflags/core/nationalflags.php on line 228: array_multisort(): Array sizes are inconsistent"

How can i fix that ?

Forum: cruiser-lounge.de
PHPBB-Version: 3.3.1
Debian-Linux 10
PHP-Version: 7.3.14
Apache-Sever-Version: 2.4.38
MySQL-Version 10.3.22
69bruno
Registered User
Posts: 5
Joined: Tue Sep 08, 2020 12:30 pm

Re: Array sizes are inconsistent

by RMcGirr83 » Tue Sep 08, 2020 4:17 pm

How did you delete all the flags?
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
RMcGirr83
Former Team Member
Posts: 22099
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Array sizes are inconsistent

by 69bruno » Tue Sep 08, 2020 4:38 pm

In the acp and in the folder flags with ftp
69bruno
Registered User
Posts: 5
Joined: Tue Sep 08, 2020 12:30 pm

Re: Array sizes are inconsistent

by RMcGirr83 » Tue Sep 08, 2020 7:28 pm

You deleted each and every flag from within the ACP? All 200+ of them? If that is the case then no one should have a flag set. A user has a flag set so that's why you are getting that error. What was the point of using the extension if you were going to delete all the flags? Try purging the cache I guess see if that does anything. What version of this extension are you using?
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
RMcGirr83
Former Team Member
Posts: 22099
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Array sizes are inconsistent

by 69bruno » Wed Sep 09, 2020 6:56 am

Yes, I did. I use the ext not for the flags of the main country, I use it for the sub countries. But as I told, after deleting all of them i couldn't add a new one in the acp. I first had to write an entry in the db.
This manipulation causes the error i think. How do the id's count ? I gave the one flag the ID "1". But the other flags got an ID above 231.

Version 2.1.9
69bruno
Registered User
Posts: 5
Joined: Tue Sep 08, 2020 12:30 pm

Re: Array sizes are inconsistent

by RMcGirr83 » Wed Sep 09, 2020 10:40 am

The id's are auto incremented in the database. Was an error tossed when trying to add a flag via the ACP? If so what was the error.

For the record, I just went into the database, deleted all the flags from the flags table, changed all the users in the database user_flag column to 0, deleted all the images from the extensions flags directory, purged the cache on the forum and was able to add a flag just fine in the ACP. I think your issue is you used a flag ID of 1 instead of the next ID (mine was set as 233 after adding the flag).
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
RMcGirr83
Former Team Member
Posts: 22099
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Array sizes are inconsistent

by RMcGirr83 » Wed Sep 09, 2020 10:45 am

This is the version sitting in the queue waiting to be validated.

https://github.com/rmcgirr83/nationalfl ... tag/v2.2.2
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
RMcGirr83
Former Team Member
Posts: 22099
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Array sizes are inconsistent

by 69bruno » Wed Sep 09, 2020 12:05 pm

The error that occured was only that nothing happend after klicking on "add new flag".

I try the new version and report.
69bruno
Registered User
Posts: 5
Joined: Tue Sep 08, 2020 12:30 pm

Re: Array sizes are inconsistent

by 69bruno » Wed Sep 09, 2020 1:32 pm

Now it works.
I deactivated the old version, killed the working data,installed and activated the new version, killed all entries in the flag table in the db and in the flag folder. Could add new flags, added my ones and at the end.... no error. THX
69bruno
Registered User
Posts: 5
Joined: Tue Sep 08, 2020 12:30 pm