SOLVED Duplicate Domains menu

Status
Not open for further replies.

vuthy09

Member
Jun 12, 2023
106
7
18
40
How to get rid of these Domains menu? I try to remove it from menu manager, but it comes back gain? I think database not update, and it is an sql glitch, anyone have any idea to fix it please

1707025484631.png
1707025440965.png
 

Attachments

  • 1707025212375.png
    1707025212375.png
    24.3 KB · Views: 5
  • 1707025256100.png
    1707025256100.png
    50.9 KB · Views: 5
Last edited:

tfernandez

Member
Oct 31, 2019
37
11
8
31
Go to Advanced>Menu Manager and open the default (unless you are using a custom menu).

Ctrl+F for "Domains"

Delete one of them.
 
  • Like
Reactions: vuthy09

vuthy09

Member
Jun 12, 2023
106
7
18
40
Go to Advanced>Menu Manager and open the default (unless you are using a custom menu).

Ctrl+F for "Domains"

Delete one of them.
Thank you for your reply
I have deleted it many times, but it still comes back when update app default
 

tfernandez

Member
Oct 31, 2019
37
11
8
31
Can you try deleting them both and then rereun menu defaults?

Also, can you check your core/domains/app_menu.php file to make sure there isny any duplicates? Make sure that uuid and parent_uuid is only populated once.
 
  • Like
Reactions: vuthy09

vuthy09

Member
Jun 12, 2023
106
7
18
40
Can you try deleting them both and then rereun menu defaults?

Also, can you check your core/domains/app_menu.php file to make sure there isny any duplicates? Make sure that uuid and parent_uuid is only populated once.
I try to delete them both as you said, but when I rerun menu defaults, they are coming back again.
I see only one of uuid and parent_uuid, please you look at my screenshot below.

and how can I check v_menus table field, any command to use?


1707281954874.png
 
Last edited:

tfernandez

Member
Oct 31, 2019
37
11
8
31
Hi @vuthy09 , very weird. v_menus wont show you the menu items, you'll need to look at v_menu_items. That will show you what you already know though.

You can access the postgres cli by typing sudo -u postgres psql

The menu items are generated from the app_menu.php files so it's possible that you have multiple. Can you provide the results to the following command:
Bash:
cat /var/www/fusionpbx/*/*/app_menu.php | grep /core/domains/domains.php
 

voipBull

Member
Dec 3, 2023
97
21
8
well, looks like that solved the issue, or atleast pointed in the right direction.

Here's the output of that command BTW;

Code:
root@fusionpbx-ubuntu-20-4:~# grep /core/domains/domains.php  /var/www/fusionpbx/*/*/app_menu.php
/var/www/fusionpbx/app/phone/app_menu.php:      $apps[$x]['menu'][$y]['path'] = "/core/domains/domains.php";
/var/www/fusionpbx/core/domains/app_menu.php:   $apps[$x]['menu'][$y]['path'] = "/core/domains/domains.php";

It's the phone app (Commonality between me and OP), that has a app_menu.php file that has the following code;

Code:
<?php

    $y=0;
    $apps[$x]['menu'][$y]['title']['en-us'] = "Domains";
    $apps[$x]['menu'][$y]['title']['ar-eg'] = "";
    $apps[$x]['menu'][$y]['title']['de-at'] = "Domänen";
    $apps[$x]['menu'][$y]['title']['de-de'] = "Domänen";
    $apps[$x]['menu'][$y]['title']['es-cl'] = "Dominios";
    $apps[$x]['menu'][$y]['title']['es-mx'] = "";
    $apps[$x]['menu'][$y]['title']['fr-ca'] = "";
    $apps[$x]['menu'][$y]['title']['fr-fr'] = "domaines";
    $apps[$x]['menu'][$y]['title']['he-il'] = "";
    $apps[$x]['menu'][$y]['title']['it-it'] = "Domini";
    $apps[$x]['menu'][$y]['title']['nl-nl'] = "";
    $apps[$x]['menu'][$y]['title']['pl-pl'] = "Domeny";
    $apps[$x]['menu'][$y]['title']['pt-br'] = "Dominios";
    $apps[$x]['menu'][$y]['title']['pt-pt'] = "Domínios";
    $apps[$x]['menu'][$y]['title']['ro-ro'] = "";
    $apps[$x]['menu'][$y]['title']['ru-ru'] = "Домены";
    $apps[$x]['menu'][$y]['title']['sv-se'] = "Domäner";
    $apps[$x]['menu'][$y]['title']['uk-ua'] = "Домени";
    $apps[$x]['menu'][$y]['uuid'] = "4fa7e90b-6d6c-12d4-712f-62857402b801";
    $apps[$x]['menu'][$y]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
    $apps[$x]['menu'][$y]['category'] = "internal";
    $apps[$x]['menu'][$y]['path'] = "/core/domains/domains.php";
    $apps[$x]['menu'][$y]['groups'][] = "superadmin";

?>

this file is not needed to get the phone to work. Just removed it and run ADVANCED > UPGRADE > App Defaults & Menu Defaults & Permission Defaults > Logout / Login, and the duplicate domains menu is gone. Thanks @tfernandez cheers
 
  • Like
Reactions: vuthy09
Status
Not open for further replies.