Destinations duplicating on a fresh install

Status
Not open for further replies.

voipBull

Member
Dec 3, 2023
96
21
8
Tried this on two fresh installs, FusionPBX master branch, just to rule out any config errors and same results. No new applications or mods installed after fresh install.

Added first inbound destination, and saved it. (Using fake numbers for demo, and leaving the ACTION blank - same results)

1714669857898.png1714670147154.png1714670221851.png

All is good until here.

Then added a second inbound destination.

1714670342703.png1714670407725.png

As soon as you save the second destination number, and go back to the destinations menu, below is what you see. The first destination entry shows twice, and the second destination entry does not show at all.

1714670605806.png

Here, if you click on SHOW ALL, now you can see the two inbound destination entries.

1714670745859.png

If you switch back to the destinations menu, you again see the duplicated destination entries.

If you select the two duplicated entries and delete them both, then you see the second inbound destination entry added above.

1714670963387.png
1714670983969.png

Has anyone else come across this?
 

voipBull

Member
Dec 3, 2023
96
21
8
Well, looks like its just a typo in a recent commit (6176ea2) to destinations.php

Line 244

Code:
foreach ($destinations as &$row) {

should be

Code:
foreach ($destinations as $row) {
 

voipBull

Member
Dec 3, 2023
96
21
8
@whut I only signed my CLA to be a contributor for the project yesterday after I found this issue. Waiting for the signed CLA pull request to be merged first.
 
  • Like
Reactions: whut

voipBull

Member
Dec 3, 2023
96
21
8
BTW, fixing the above typo in destinations.php fixes the duplication issue, but looks like there's another issue with Actions column as well. I see changes were made to actions function as well in the same commit (6176ea2).
 

whut

Member
Dec 23, 2022
228
22
18
@voipBull @markjcrane I did some further digging. The `&$row` is causing the list of destinations to always display the last destination twice and you do not ever see the next to last destination. Hover and edit shows it is the same record displaying twice. If you change the sort order of the destinations you will see the wrong destinations changes because of which are the last 2.

removing `&` fixes this issue but then the actions are not displayed. You can see the action if you edit the action.
 

markjcrane

Active Member
Staff member
Jul 22, 2018
503
178
43
49
@whut I only signed my CLA to be a contributor for the project yesterday after I found this issue. Waiting for the signed CLA pull request to be merged first.
I accept CLA when a contributor has a pull request. Otherwise, we would have a lot of contributors in the list that don't contribute anything.
 
Status
Not open for further replies.