Blesta Addons Posted June 14, 2021 Report Posted June 14, 2021 in navigation, when we are playing with client navigation, the hover of link show the client uri exact (client/plugin/xxxxxx/client_main). but when we go to client area, the navigation is rendered without the client_uri, is rendered (plugin/xxxxxx/client_main) without client leading prefix.
Jono Posted June 15, 2021 Report Posted June 15, 2021 Good catch. Currently the behavior is to link all plugin links through the public_uri instead of the client_uri. This was to make the URLs a little cleaner. I believe the hover tooltip should be updated to remove the client/ portion for plugin links
Blesta Addons Posted June 15, 2021 Author Report Posted June 15, 2021 On 6/15/2021 at 3:45 PM, Jono said: Good catch. Currently the behavior is to link all plugin links through the public_uri instead of the client_uri. This was to make the URLs a little cleaner. I believe the hover tooltip should be updated to remove the client/ portion for plugin links Expand but in reality some plugin links need to be inside the client_uri not public_uri .
Jono Posted June 15, 2021 Report Posted June 15, 2021 On 6/15/2021 at 5:06 PM, Blesta Addons said: On 6/15/2021 at 3:45 PM, Jono said: Expand but in reality some plugin links need to be inside the client_uri not public_uri . Expand Can you give an example?
Blesta Addons Posted June 15, 2021 Author Report Posted June 15, 2021 On 6/15/2021 at 5:09 PM, Jono said: Can you give an example? Expand not example , a real case we have some plugins that are injecting in client navigation, and we add some widget for them, in the widget the base_uri generate link with client/ prefix and the navigation generate links out them, so here we have a duplicate link for the same location. when accessing a link without client prefix,the link is listing some rows, the confirm delete modal not working, we need to go the prefixed link to make it work. this is sufficient or not?
Jono Posted June 23, 2021 Report Posted June 23, 2021 On 6/15/2021 at 5:36 PM, Blesta Addons said: when accessing a link without client prefix,the link is listing some rows, the confirm delete modal not working, we need to go the prefixed link to make it work. Expand Have you debugged why this is the case? The support manager plugins use widgets with ticket lists and a close modal and all works fine with or without the client/ prefix.
Blesta Addons Posted June 24, 2021 Author Report Posted June 24, 2021 On 6/23/2021 at 11:45 PM, Jono said: Have you debugged why this is the case? The support manager plugins use widgets with ticket lists and a close modal and all works fine with or without the client/ prefix. Expand i will check with my team, the last time i have tested with a custom plugin it was returning error (404) as it fetch the modal from url without client prefix (GET https://xxxxxxxxxxx/dialog/confirm/?message=Are you sur you want to delete this Playlist?&confirm_url=/plugin/smart_one/client_main/delete/84984/active/&confirm_data= )
Jono Posted June 24, 2021 Report Posted June 24, 2021 On 6/24/2021 at 10:25 AM, Blesta Addons said: i will check with my team, the last time i have tested with a custom plugin it was returning error (404) as it fetch the modal from url without client prefix (GET https://xxxxxxxxxxx/dialog/confirm/?message=Are you sur you want to delete this Playlist?&confirm_url=/plugin/smart_one/client_main/delete/84984/active/&confirm_data= ) Expand I see now, the client ticket list page does this: $('#client_tickets a[rel]').blestaModalConfirm({ base_url: '<?php echo (isset($this->client_uri) ? $this->Html->safe($this->client_uri) : null);?>', submit: true, confirm_data: {id: $('input[name=\"id\"]', $(this)).val()} }); Instead of making you do the same, I will create a task to add a dialog.php controller so the /dialog will be a valid path instead of requiring /client/dialog. Is this sufficient to resolve the issue?
Blesta Addons Posted June 24, 2021 Author Report Posted June 24, 2021 On 6/24/2021 at 8:14 PM, Jono said: see now, the client ticket list page does this: $('#client_tickets a[rel]').blestaModalConfirm({ base_url: '<?php echo (isset($this->client_uri) ? $this->Html->safe($this->client_uri) : null);?>', submit: true, confirm_data: {id: $('input[name=\"id\"]', $(this)).val()} }); Expand we have the base_uri instead of client_uri, and we have fixed with client_uri. the issue is not the popup modal, is the client navigation url, some plugin is set for client side and need to be under client prefix, others for public and should be without client prefix , i think this is the issue not the dialog modal. that was my point of view regarding PUBLIC and CLIENT navigation url, if they are the same why we have public and client?!!
Jono Posted June 24, 2021 Report Posted June 24, 2021 On 6/24/2021 at 9:16 PM, Blesta Addons said: the issue is not the popup modal, is the client navigation url, some plugin is set for client side and need to be under client prefix, others for public and should be without client prefix , i think this is the issue not the dialog modal. Expand I'm sorry, I still don't understand why the prefix is necessary. The client controllers can extend ClientController and have a name like client_main regardless of whether they are accessed with the client prefix. On 6/24/2021 at 9:16 PM, Blesta Addons said: that was my point of view regarding PUBLIC and CLIENT navigation url, if they are the same why we have public and client?!! Expand Fair question. I'm not sure we do need a Public and Client URI, perhaps we should consider removing them. Obviously we still would keep client vs public navigation though as we wouldn't display the same nav items to each.
Blesta Addons Posted June 24, 2021 Author Report Posted June 24, 2021 On 6/24/2021 at 9:24 PM, Jono said: Obviously we still would keep client vs public navigation though as we wouldn't display the same nav items to each. Expand and this is correct, and also it should has different navigation link for clients and public. unless we considerate a client is like a public. finally, the client prefix exist for something, if not it should be removed.
Jono Posted June 24, 2021 Report Posted June 24, 2021 On 6/24/2021 at 10:10 PM, Blesta Addons said: finally, the client prefix exist for something, if not it should be removed. Expand In the core files, the client URI is mapped to client controllers, so for the core it has a purpose. As far as I can tell, it doesn't have a purpose related to plugins, except a visual cue that lets the user know they are in the client interface.
Blesta Addons Posted June 24, 2021 Author Report Posted June 24, 2021 On 6/24/2021 at 10:51 PM, Jono said: In the core files, the client URI is mapped to client controllers, so for the core it has a purpose Expand it has some effects in inherit classes or methods for Uri with client prefix?
Jono Posted June 24, 2021 Report Posted June 24, 2021 On 6/24/2021 at 11:03 PM, Blesta Addons said: it has some effects in inherit classes or methods for Uri with client prefix? Expand Controllers can inherit the ClientController class regardless of whether they are accessed via the client_uri. The ->base_uri is modified, but that shouldn't have an affect on the plugin related links. The only issue would come when a plugin was using ->base_uri to link to a core client controller.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now