I've got the next to latest Campsite (3.4.2) installed on a RedHat box and to start with, I added one subdomain via the Virtual Host set up and installed the database and got a site up and running! I templated everything into our html structure and played with all the issue and section and article calls until I felt comfortable.
Then I went ahead and created a new subdomain for adding another Publication into this same install. So one pub subdomain starts with cms.mysite.com and the new one was news.mysite.com. I checked that the server recognized the site, which it did, then I ran an RSynch between the old directory and the new one in that subdomain. Sort of like this:
Then I logged into cms.mysite.com/admin and added the new publication called Newsletters to the news.mysite.com alias. Then I went ahead and templated the html calls into a cloned set of the classic templates...as I had with the first site...and now I can't get news.mysite.com to show me a created and published article in an issue within the context of the new templates.
Instead, the frontpage of the new site shows me the old header and footer (yes I double checked the templates that are being called via my new index.tpl and they all point to the the new template folder and files therein) and a link for the new article (yet not the article Body which I am calling). When I click on the link (using short names in the config) this link is where the site tries to go (/en/tst/news/93/Social-Media.htm) and the page comes up as empty/not found.
So I spent the day today combing through the documentation looking for more details on adding another Publication to a Campsite install and how to configure that (via templating, PHP code or via the CMS itself) and found very little on the subject to my surprise.
So did I miss a section of documentation? Did I assume incorrectly one can add another publication to an install running on cms.mysite.com/admin and then publish content to news.mysite.com without having to reinstall all over again? Or should I not have used RSynch? Should I be doing things with the {{ set_default_publication }} tag in the header.tpl?
Any helpful pointers or further insights as to adding Publications and configuring them is much appreciated! Thanks!!!!!
Posts: 1,526Member, Administrator, Sourcefabric Team
Campsite can handle multiple publications. You don't need to install another campsite instance for second publication. Just create in the first instance the publication for news site (http://en.flossmanuals.net/Campsite/CreatingAPublication) and create in templates folder new templates for a second publication (just create another folder and copy template files)
Don't use sync to create new instances, this will just crash your sites.
Campsite has config files that set paths for include files, templates etc.,
set the database access parameters etc. Your 2 separate instances have
identical config files so at least one instance will access wrong paths and
both instances work on the same database and this results in
inconsistencies. You must reinstall Campsite for each instance.
Also, you can create 2 or more publications in the same Campsite instance,
just add aliases to the virtual host and set the proper domain name in the
publication config screen (admin menu->content->publications->configure
publication->edit aliases)
> I've got the next to latest Campsite (3.4.2) installed on a RedHat box
> and to start with, I added one subdomain via the Virtual Host set up and
> installed the database and got a site up and running! I templated everything
> into our html structure and played with all the issue and section and
> article calls until I felt comfortable.
>
> Then I went ahead and created a new subdomain for adding another
> Publication into this same install. So one pub subdomain starts with
> cms.mysite.com and the new one was news.mysite.com. I checked that the
> server recognized the site, which it did, then I ran an RSynch between the
> old directory and the new one in that subdomain. Sort of like this:
>
>
>
> $ rsync -Pva /var/www/html/campsite-3.4.2/implementation/site/
> /var/www/html/cms.mysite.com/
> $ chown -R myusername:apache /var/www/html/news.mysite.com
>
> Then I logged into cms.mysite.com/admin and added the new publication
> called Newsletters to the news.mysite.com alias. Then I went ahead and
> templated the html calls into a cloned set of the classic templates...as I
> had with the first site...and now I can't get news.mysite.com to show me a
> created and published article in an issue within the context of the new
> templates.
>
> Instead, the frontpage of the new site shows me the old header and footer
> (yes I double checked the templates that are being called via my new
> index.tpl and they all point to the the new template folder and files
> therein) and a link for the new article (yet not the article Body which I am
> calling). When I click on the link (using short names in the config) this
> link is where the site tries to go (/en/tst/news/93/Social-Media.htm) and
> the page comes up as empty/not found.
>
> So I spent the day today combing through the documentation looking for more
> details on adding another Publication to a Campsite install and how to
> configure that (via templating, PHP code or via the CMS itself) and found
> very little on the subject to my surprise.
>
> So did I miss a section of documentation? Did I assume incorrectly one can
> add another publication to an install running on cms.mysite.com/admin and
> then publish content to news.mysite.com without having to reinstall all
> over again? Or should I not have used RSynch? Should I be doing things with
> the {{ set_default_publication }} tag in the header.tpl?
>
> Any helpful pointers or further insights as to adding Publications and
> configuring them is much appreciated! Thanks!!!!!
>
>
So I followed Andrey's suggestion in adding the publication (first I deleted the the news.mysite.com pub and directories). Here's what I did (and it still won't work):
1) started completely over. I added the virtual host for my subdomain pointing at an empty directory named news and restarted Apache...
2) I restored an earlier version of my Campsite CMS (from a week ago before I first tried to add this publication) and restarted Apache
3) I added this new subdomain as the alias for a New Publication I created called Newsletters
4) I assigned templates and created an issue/section and article.
5) I published everything and went to the subdomain.
6) Nothing. Still just the Apache test page.
I know that adding a publication SOUNDS simple. I'm not sure what I'm doing wrong.
Mugur seemed to insinuate re-installing both instances when he said "You must reinstall Campsite for each instance". I'm kind of unclear on this though since I'm also being told I only need one install then I just create my virtual hosts and add new publications to that install and assign the templates to skin the new publication. Which does seem like the best approach. If only I could figure out what I've done wrong. What exactly is meant by an "instance"? Should I copy the implementation contents into my new directory I set up for this new subdomain? Then what? Do I need to adjust any parameters if I do this?
If I have to reinstall Campsite, I guess I could do that, but I would lose a month's worth of test data we were setting up. I wanted to see how content sharing across two publications would work, and since it seems publications can share a DB, it seemed like we could reuse articles and publish them into a new publication. So I don't want to have to run two separate installations unless I've misunderstood what Campsite can and can't do.
Or maybe there's a way I could reinstall Campsite on the first subdomain I set up for our initial Publication and restore that data and just try this whole Adding a New Pub to that install over again.
I did read the Create a New Publication link in the documentation...and yes, it sounds so simple! But that documentation fails to go into detail on what needs to be done behind the scenes on the Linux end. The user interface already implies what the instructions in the Floss manual say. In other words, it didn't shed any light on the issue for me. Is there anything a bit more detailed about Administration set up of new pubs?
Ok. So I did some more reading and basically understand now that EVERYTIME I want a new publication, I'll have to install campsite into that folder my new virtual host is pointed at. Is this correct? Kind of a pain, but ok, that's fine.
So I grabbed Campsite 3.4.2 (the latest) and unpacked it and moved the contents of "src" (although the docs say to look for "implementation") into the root of my news folder (which is where my virtual host is pointed at) . Then I followed Step 7 of the installation page on Floss and pointed my browser at the subdomain (news.mysite.com). It did redirect me into the install folder where absolutely nothing else happened. I now have a completely blank page. No steps to follow. Nothing.
So now I'm giving up for awhile. I guess until I try again to read some more and research this. I don't know what files to change or how to get them to look at the same database the other publication is using (like is there a simple config.php file I could just open and set up to connect to my DB?).
But some documentation on Creating a New Publication - Steps to take with Linux for Campsite 3.4.2 would be really, really awesome right now. Just saying
In the meantime, what can I do to just get a new pub running?