Welcome, Guest
Please Login or Register.  Lost Password?

Locally served javasscript path issue
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Locally served javasscript path issue
#667
Locally served javasscript path issue 2 Years ago Karma: 0
Hi

Just before Christmas I looked at my source code and realised that the javascript was being served through your site and I felt that it should be on my server so was going to message you and then found the option to host it locally and thought all was sorted (and didnt check) but seemingly you dont take into account that some people have it in a sub directory. Seemingly my support system hasnt been working since i made the change because its hardcoding to /components rather than just components in the code.

In the plugins/system/livechat.php file you have

Code:


    elseif($settings->loadMediaFrom == 'local_root')
    {
        //  Load from local webserver, relative to root
        $document->addScript('/components/com_livechat/js/livechat_v3.js');

        if($isLivechatPopup)
        {
            $document->addStyleSheet('/components/com_livechat/css/popup_v3.css');
            $document->addStyleSheet('/components/com_livechat/css/custom.css');
        }
    }



You need to remove the leading / in front of components

Ive done it in my version and all now works

Tony
mail127
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#668
Re:Locally served javasscript path issue 2 Years ago Karma: 1
Hi Tony,

Changing the source code is not necessary. There are 3 options in the "Load media from" setting.

1. Remote Cloud Network (High Speed)

2. My Own Webserver (Relative to Document)

3. My Own Webserver (Relative to Website Root)


if you choose option 3, then there is a forward slash (/) in the front of the path... if you choose option 2, there is no forward slash in the front... it is relative to document, which is perfect for those who have joomla installed in a sub directory.
admin
Administrator
Posts: 650
graph
User Offline Click here to see the profile of this user
Location: California
The CMS Fruit Team
The administrator has disabled public write access.
 
#669
Re:Locally served javasscript path issue 2 Years ago Karma: 0
Hi

Thanks for the quick reply. tbh, I think I saw that at the time and thought it was relative to the document being displayed (which, with SEO appears on screen as /cms/path/to/document), rather than relative to the top of the joomla tree. I took the root option to mean root of the joomla tree given that components wouldnt normally need to access anything above the joomla tree root but I now see from your explanation what its meant to be.

Can you tell me where I can find on an install what the current version is so I can see whether I applied the 3.7.4 files. I know I downloaded from your site to my PC but cant see if I applied the module, plugin and component and can't see a "current version" anywhere on the screen. I'll apply the 3.7.4 anyway which will reverse the few minor changes I did to the plugin but just wondered where I can see whats currently installed for each element required?

Thanks again for the quick response

Tony
mail127
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#670
Re:Locally served javasscript path issue 2 Years ago Karma: 1
Hi Tony,

You can check what version of the JLive! Chat component/plugin/module is installed by going to Extensions -> Install/Uninstall -> Components from within your Joomla administrator.


You can always download the latest version of JLive! Chat from our download section.
admin
Administrator
Posts: 650
graph
User Offline Click here to see the profile of this user
Location: California
The CMS Fruit Team
The administrator has disabled public write access.
 
Go to topPage: 1