English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottomPage: 12
TOPIC: Module Installation
#4688
Re: Module Installation 13 Years, 10 Months ago Karma: 0
Hi Edwin,

Thanks for the reply.

The plugin itself works correctly and compresses and combines the slave site's CSS and JS files into one file and stores this in the slave site's cache folder.

However, the plugin creates a link in the head section of the slave site like:

<link rel="stylesheet" type="text/css" href="/plugins/system/CssJsCompress/css.php?css=e6145bf85ae684dbe03491a0aac5128d.css.gz"/>

Now, the slave site plugin directory is sym-linked to the master site plugins directory. So on the slave the link statement calls css.php and the PATH_ROOT in the below code becomes the path to the master site and not the slave site. So in effect it looks for the file in the master site's cache folder and not the slave site cache folder...does that make sense?

One of the problems is that the above call to css.php is done outside of the joomla framework and just outputs a header and loads the css file.

Does that make sense? What I want to happen is that css.php loads the cached file from the slaves cache folder not the master cache folder.

One way to do this would be to pass some slave site identifier as a second url parameter to the css.php file.

E.g. css.php?css=e223423wersdfsdf323.css.gz&site_path=/site/path

This would require a patch for the plugin though and not JMS. Is it possible to get a JMS site_path or site_id for a slave in a plugin?

Thanks for your help.

Adam
adster101
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#4689
Re: Module Installation 13 Years, 10 Months ago Karma: 54
To get the JMS Site ID, this require to have a call to the index.php.

Based on your explaination, they hack the joomla code to bypass the joomla index entry point and event don't perform any call the the configuration.php to get the DB connection.

Don't add a path as parameter in the url. This could open a security hole.

Send us this extension in attachement of an email to be able see all the code and allow us to see if a patch could be possible.

As this extension is probably used within a themes (template), also send us all the material that would help us reproduce the problem you have described.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#4695
Re: Module Installation 13 Years, 10 Months ago Karma: 0
I have attached the plugin here which I hope is okay.

I don't think they really 'hack' the code and bypass the index.

The plugin simply adds a <link> statement to the head section of the site which points to a cached file ( it one exists ). I don't think this is really any different from outputting any other <link> statement in the <head> section. Joomla core will create the <head> section based on the plgins etc but when this is rendered the browser itself has no concept of joomla framework...

Do you think that css.php should try and get an instance of the joomla framework when it is called? Is this possible from a dynamic file called from a <link> statement? Do you want me to post a link to slave site which is demonstrating this issue?

Anyway, all your help is much appreciate.

Adam
File Attachment:
File Name: 004_CssJsCompress3.zip
File Size: 21407
adster101
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#4702
Re: Module Installation 13 Years, 10 Months ago Karma: 54
If they had performed a Joomla initialisation, to get the JPATH_ROOT or JPATH_BASE, it would be better.
Instead they computed their own PATH_ROOT.

I will try to see if I can patch this "css.php" file but in fact, I should completly rewrite it.
Perhaps I will just replace all the css.php with a new code that will compute the JPATH_BASE and will use it to compute JPATH.
This will take several days or perhaps weeks.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#4812
Re: Module Installation 13 Years, 9 Months ago Karma: 54
A new JMS Multisites patch definition 1.2.39 including a patch for CssJsCompress is now available.

The patch compute the slave site directory for the CSS and JS compression scripts.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla