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?

Linking to images in specific directory for slave
(1 viewing) (1) Guest
Go to bottomPage: 123
TOPIC: Linking to images in specific directory for slave
#6104
Linking to images in specific directory for slave 14 Years ago Karma: 0
I've set up my template according to the directions in CP-05. My slave sites are correctly deploying with copies of the images folder from the master site (which is exactly the behavior I want).

However an image with the src written as "images/stories/image1.jpg" links to the image that's in the master site, not the multisites slave. So even if I replace my image in site.com/multisites/slave1/images/stories/image1.jpg with a new file, I still get the original file from site.com/images/stories/image1.jpg.

I've currently got the template set up as:
Deployment Folder: {site_dir}
Alias Link: Blank
Path to Media Folder: images
Path to Image Folder: images/stories

I've also seen forum posts where you've recommended leaving the images and media paths blank, so I've tried it that way. I've also tried using {rel_site_dir}/images/stories. All seem to have the same results. Am I required to write the entire "multisites/slave1/images/stories/image1.jpg" path? Seems like each slave site should be able to write a path relative to it's own deployed directory.
myathleticresume
Junior Boarder
Posts: 20
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6107
Re: Linking to images in specific directory for slave 14 Years ago Karma: 54
If you followed the tutorial CP-05, I suppose that you also have setup the files and folder tabs with
- images action = copy
- templates action = copy

Verify that the folders created on the slave site are effectivelly physical directory and not a symbolic link.

Concerning the "SRC" images path, perhaps your template use a "<base href="www.YOURDOMAIN.com/" /> in the head section and that the URL is wrong.

Perhaps also that you are using a ".htaccess" file that have a rewritebase parameter that make reference to the master.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6110
Re: Linking to images in specific directory for slave 14 Years ago Karma: 0
There is no base URL specified in the head, and also no .htaccess file. Yes, the images folder is being copied, I've chosen to leave the templates in the master.

If I write the SRC as an absolute path (http:// slave1.com/images/stories/image1.jpg) they work fine. Relative URLs (/images/stories/image1.jpg OR images/stories/image1.jpg) don't work.
myathleticresume
Junior Boarder
Posts: 20
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/12/22 20:43 By myathleticresume.
The administrator has disabled public write access.
 
#6112
Re: Linking to images in specific directory for slave 14 Years ago Karma: 54
Now, you mentioned that you enter a SRC with an absolute path.
Where do you enter such SRC.

If you mean the parameters
Path to Media Folder: images
Path to Image Folder: images/stories

They must be relative.
They correspond to the "Global Configuration" media settings parameters.

So I don't see where you enter a SRC with absolute path.
Perhaps you enter such SRC in a specific plugin or extension.
Can you explain.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6113
Re: Linking to images in specific directory for slave 14 Years ago Karma: 0
I'm talking about writing an image tag in the actual code of the page. The parameters are set as you mentioned above: images and images/stories. And yes, the Global Config of the slave sites show the same info: images and images/stories.
myathleticresume
Junior Boarder
Posts: 20
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#6114
Re:Linking to images in specific directory for slave 14 Years ago Karma: 0
Okay, I'm still trying different things here. Now in the parameters I have:
Code:

Deployment Folder: Blank
Media Folder: {rel_site_dir}/images
Image Folder: {rel_site_dir}/images/stories



When I create a new slave using these parameters the Global Config values read:

Code:

Media Folder: multisites/slave1/images
Image Folder: multisites/slave1/images/stories



Using Media Manager shows me the contents of the correct (multisites/slave1/images/stories) folder. However using the JCE image manager shows me the images/stories folder from the master site.

Next I tried the following settings:

Code:

Deployment Folder: {site_dir}
Media Folder: images
Images Folder: images/stories



This gave me the same results as above - images are uploaded (and linked) to the images folder of the master site, even though the URLs read http:// slave1.com/images/stories/image1.jpg. And the path in the media manager reads: /var/www/vhosts/mastersite.com/httpdocs/multisites/slave1.com/images/stories.

I've also tried setting up a template with the following settings:

Code:

Deployment Folder: {site_dir}
Media Folder: {rel_site_dir}/images
Image Folder: {rel_site_dir}/images/stories



However this returns the following error when I try to create a site: Unable to create the symbolic link [multisites] -> [/var/www/vhosts/mastersite.com/httpdocs/multisites].

One other thing I've discovered, and I'm not sure if this is related or if it's supposed to be this way: When I go to the Multisites component on one of the slave sites, I get a warning that "Some patches are not installed". Checking the patches shows an error on the configuration.php file:

Code:

Not OK
The routing wrapper is not present in this MASTER configuration file.
Actions:
Add 16 lines containing the routing wrapper to the slave site.



But the option to install patches is not available. Not sure if this is a problem or not.

If I understand this right, the Multisites component is supposed to rewrite all URLs pointing to a slave domain to that domain's deployed directory, in my case under /multisites. So I should be able to write links on my pages as "images/stories/image1.jpg" and not have to include the full "multisites/slave1/images/stories/image1.jpg", right?
myathleticresume
Junior Boarder
Posts: 20
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 123
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla