qb-core icon indicating copy to clipboard operation
qb-core copied to clipboard

[BUG] Phone contacts still appearing offline after revert

Open bruinp8n opened this issue 2 years ago • 13 comments

Describe the bug Phone numbers appearing offline still after the core revert on phone number changes... and any new phone numbers for whatever reason show nil!

Questions (please complete the following information): Is my current database now screwed? is there a way to fix this?

bruinp8n avatar Jun 26 '22 22:06 bruinp8n

I have the same problem, i hope if this is a db problem it can be fixed. But I have no idea where to look, i havent seen any change in the database.

Howsn avatar Jun 27 '22 00:06 Howsn

Same issue here, I think any body who did the lasts commits got their phone numbers messed up, cannot call or see if the player is online. Can only call through the Services app. It does not appear to be db related

DB00001010 avatar Jun 27 '22 13:06 DB00001010

Same issue here, I think any body who did the lasts commits got their phone numbers messed up, cannot call or see if the player is online. Can only call through the Services app. It does not appear to be db related

How could the phone number be messed up? I dont get it. I have checked the db and everything looks the same.

Howsn avatar Jun 27 '22 17:06 Howsn

I believe anyone who was active during those changes got their phone numbers forced to integers.. and the revert goes back to not forcing everything to integars but people who flew in during those changes now have numbers set to integars

bruinp8n avatar Jun 27 '22 21:06 bruinp8n

Yes right. Delete the phone number from the database and try again

CarlBishop avatar Jun 27 '22 21:06 CarlBishop

Yes right. Delete the phone number from the database and try again

Deleting numbers work, but it there a way to convert this back the way it was? :)

Howsn avatar Jun 27 '22 22:06 Howsn

Finally last night I found the solution, I dident wanna delte all the phone numbers so I found the problem that caused this in the database.

All the phone number that had problem looked like this: "phone":123456789, They needs to look like this: "phone":"123456789",

I editet all the numbers in the db that had this problem and the phone works again.

Howsn avatar Jun 29 '22 12:06 Howsn

This can be closed

CarlBishop avatar Jun 30 '22 21:06 CarlBishop

@peppinoita why was it fixed?

nzkfc avatar Jul 02 '22 05:07 nzkfc

I have over 1000 characters in my database, anyone got a quick solution for fixing this?

bruinp8n avatar Jul 06 '22 17:07 bruinp8n

I have over 1000 characters in my database, anyone got a quick solution for fixing this?

Change the player.lua to set the number tostring until all of your numbers are converted. Then revert the setting back so that you are in line with future QBCore updates.

PlayerData.charinfo.phone = tostring(PlayerData.charinfo.phone) or QBCore.Functions.CreatePhoneNumber()

mhnl3 avatar Jul 09 '22 23:07 mhnl3

mhnl3 thank you, I did try this once as i thought this might work aswell, and then I had some people strangely still appearing offline on contacts when online...

Imma try again though maybe i scuffed something originally when I tried, thank you!

bruinp8n avatar Jul 10 '22 07:07 bruinp8n

Only need to use the tostring one in player.lua, run server then you can replace it back to the latest line and ya goochi

On Sun, 10 Jul 2022, 7:00 pm bruinp8n, @.***> wrote:

mhnl3 thank you, I did try this once as i thought this might work aswell, and then I had some people strangely still appearing offline on contacts when online...

Imma try again though maybe i scuffed something originally when I tried, thank you!

— Reply to this email directly, view it on GitHub https://github.com/qbcore-framework/qb-core/issues/736#issuecomment-1179669903, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGHUHLSKXZH46ZPIB3IMHTVTJYI5ANCNFSM5Z4TQSLA . You are receiving this because you commented.Message ID: @.***>

nzkfc avatar Jul 10 '22 12:07 nzkfc