Edit phonebook contact error

Hi all,

I installed PlaySMS 1.4.3 following this guide: https://antonraharja.com/2020/03/20/playsms-1-4-3-on-ubuntu-18-04/

I have a problem when editing an existing contact in the phonebook (admin or user profile).
When i want to modify the name, it works but when i modify the groups (add or delete some) i have a blank page after validating, and when i refresh the page i have this message: You have no access to this page.
I also had the message that says i need to fill in all the mandatory fileds before but i don’t have it now.
I don’t understand where is the problem?

I also have a question: when a contact belongs to several groups, and i export the contact list i have twice the same contact in the list if the contact has 2 groups for example.
But now when i import a list and doing the same (each line per contact per group), it creates several contacts in the phonebook.
How to create only one contact with several groups with import function. (i have about 1000 contacts to import and don’t want to do it manually…) Any idea?

Benoit.

Hi,

The php error is this one when i want to edit a phonebook contact:

Fatal error : Uncaught Error: [] operator not supported for strings in /home/xxx/playsms/public_html/plugin/feature/phonebook/phonebook.php:393 Stack trace: #0 /home/xxx/playsms/public_html/inc/app/main.php(33): include_once() #1 /home/xxx/playsms/public_html/index.php(34): include(’/home/xxx…’) #2 {main} thrown in /home/xxx/playsms/public_html/plugin/feature/phonebook/phonebook.php on line 393

I have php 7.2.
Please what do i have to do to fix it?

Benoit.

Ok, let me check. I’ll let you know if I can fix it.

anton

Thanks Anton, the problem is when modifying groups belonging to contacts.

Benoit.

Try this, change:

$maps = '';

to:

$maps = [];

in plugin/feature/phonebook/phonebook.php line 364:

Thank you Anton, it works as expected now!

Do you also know if there is a way to import contacts in CSV with several groups attached to them?

Benoit.

this needs time to fix, I can confirm that this is a bug

anton

1 Like

Thanks Anton, i know it can be a little bit tricky.

Perhaps the system can check if a contact already exist with the same informations (name, phone number, email? tags? …) then just add the group to him if it’s not empty if we can only have one group per line? Or separate groups with a comma on a unique line, thats perhaprs a better way (in export and import) ?

Benoit