SSI Serverconnect browser question

I created a standard bootstrap navbar. One of the links I have made a logout button with a browser goto the login page. Works great on a php page. When I create the include I cant get the browser action to work.

Any ideas?

Lots of ideas but even more questions

Can you clarify

What kind of SSI, SSI file or PHP

IF Server side include, is your server set up to deal with SSI files?

Do you mean the browser.goto() component or just a link and if it is a browser.goto() why not just use a link?

I first created a logout server action.
Then created a php page with a bootstrap navbar.
On one of the links, I made it a button action
then added serverconnect and a browser component
On the server connect, I setup the brower go to funtion on success
Setup the onclick action to load the serverconnect.
On the regular php page it works good, the user clicks logout button,
logs user out and goes to the login page.
I used the move to include file function to move the navbar along with all logout functions to the include. When I call the include file in another php page the logout function works but the browser goto function does not work.

include file Code attached:

Sorry, I wasn’t thinking about the include code showing up as html on my post

To show code wrap it in 3 backticks like this

<html> code </html>

You still don’t say if your include file is an HTML SSI file or a PHP include

it is a php include

I assume there are no errors in the developer console

Is the PHP include in the same directory, that could mean the path is incorrect?

I assume you are performing the redirect from the Form=>Server Connect => Success Dynamic Event? Are you sure it is running. If not already done add notifications to the page and add a success notification to confirm the event is running

.

Hi @medicaltransport
Can you check the browser console for errors when clicking the logout button?

Teodor,

When the page loads I have this error, I do not get an error when clicking the logout button. I have double checked the browser instances in the code

BaseComponent.js:276 Unknown component found! browser

a class=“nav-link” id=“logout” data-toggle=“button” dmx-on:click=“serverconnect1.load({})” href="#">Logout {{userDetails.data.userInfo[0].firstname}}

sounds like the appropriate dmx library files are not uploaded to your server. try uploading the /dmxAppConnect/dmxBrowser folder or to be safer the entire /dmxAppConnect/ folder in case anything else is missing

Can you provide a link to your page? Most probably the browser component js include is missing from your page.

https://www.dispatcherpro.com/mtsportal/quotes_inbound.php

I have the same problem… i have include php file that has logout button it only works when i’m on index.php page, other pages showing console error called ‘Unknown component found! browser’

At a guess you only have the browser component added to index.php.
You either need to add the browser component in the include file so it can always be found or every page on site, I suggest the former!

No i have the browser component in include file, i did logout button inside include file and added browser also server connect.

You are previewing just the content page in Wappler and that is why the browser is not found.

If you just run your main page in the browser it should be all fine

Hi George, im not previewing content page, i have index.php as main page, blog.php, contact.php is other pages, i have one include php file which has been used as navigation for all this page as SSI. which is php include, What i did was, added a logout button to that include page and added browser component, server connect to pickup the logout server action , also done the dynamic event for to redirect after logout to login.php. so the idea is right, as i followed the documentation to do logout functionality. but as i said index.php is working fine when i click on logout button , but when im in blog.php page then clicked in logout then its not working as expected. console has the above error on secondary pages. but not in index.php. i confirm that all the pages has SSI as navigation bar with logout button.