Mailing List Archive

messed up preview
Hi,
users gets confused previewing documents having
media with the same file names. An image from one
site appears on another site, too. Is there a solution
to this? Should I go for unique media file names?

Regards,
Zdravko
Re: messed up preview [ In reply to ]
On Mar 10, 2011, at 6:17 AM, Zdravko Balorda wrote:

> Hi,
> users gets confused previewing documents having
> media with the same file names. An image from one
> site appears on another site, too. Is there a solution
> to this? Should I go for unique media file names?

How does an image in one site get used in another site?

Best,

David
Re: messed up preview [ In reply to ]
David E. Wheeler wrote:
> On Mar 10, 2011, at 6:17 AM, Zdravko Balorda wrote:
>
>> Hi,
>> users gets confused previewing documents having
>> media with the same file names. An image from one
>> site appears on another site, too. Is there a solution
>> to this? Should I go for unique media file names?
>
> How does an image in one site get used in another site?

Since it has the same file name, and preview doesn' refresh
the file. Oh, I see, it's the media that templates
find via ::list() and not via related image element. Could that
be the case here? Actually, there are quite a few such a media.
Almost all the graphics outside the story itself...
And if there are different background.gif on two sites they
can get mixed.

Now, I really wonder how to fix this.
Zdravko
Re: messed up preview [ In reply to ]
On Mar 10, 2011, at 10:10 PM, Zdravko Balorda wrote:

> Since it has the same file name, and preview doesn' refresh
> the file. Oh, I see, it's the media that templates
> find via ::list() and not via related image element. Could that
> be the case here? Actually, there are quite a few such a media.
> Almost all the graphics outside the story itself...
> And if there are different background.gif on two sites they
> can get mixed.

Be sure to pass `site_id => $story->get_site_id` to Media->list() to make sure you only get media from the current site.

Best,

David
Re: messed up preview [ In reply to ]
David E. Wheeler wrote:
> On Mar 10, 2011, at 10:10 PM, Zdravko Balorda wrote:
>
>> Since it has the same file name, and preview doesn' refresh
>> the file. Oh, I see, it's the media that templates
>> find via ::list() and not via related image element. Could that
>> be the case here? Actually, there are quite a few such a media.
>> Almost all the graphics outside the story itself...
>> And if there are different background.gif on two sites they
>> can get mixed.
>
> Be sure to pass `site_id => $story->get_site_id` to Media->list() to make sure you only get media from the current site.
>

David, hi,
but all preview files come from /data/preview directory. If one have
AUTO_PREVIEW_MEDIA = Yes
than the latest upload determines what's in the file. Doesn't it?

Zdravko
Re: messed up preview [ In reply to ]
On Mar 16, 2011, at 10:58 PM, Zdravko Balorda wrote:

>> Be sure to pass `site_id => $story->get_site_id` to Media->list() to make sure you only get media from the current site.
>
> David, hi,
> but all preview files come from /data/preview directory. If one have
> AUTO_PREVIEW_MEDIA = Yes
> than the latest upload determines what's in the file. Doesn't it?

Yes. But each destination should have a different directory specified, and you should be using different destinations for each site.

Best,

David
Re: messed up preview [ In reply to ]
David E. Wheeler wrote:
>> but all preview files come from /data/preview directory. If one have
>> AUTO_PREVIEW_MEDIA = Yes
>> than the latest upload determines what's in the file. Doesn't it?
>
> Yes. But each destination should have a different directory specified, and you should be using different destinations for each site.
>

I have local preview. That is, there is only one destination for previews. Otherwise,
each site have its own publishing destination.
Am I doing something wrong here?

Regards, Zdravko
Re: messed up preview [ In reply to ]
On Mar 17, 2011, at 10:59 PM, Zdravko Balorda wrote:

> I have local preview. That is, there is only one destination for previews. Otherwise,
> each site have its own publishing destination.
> Am I doing something wrong here?

Not “wrong,” per se, but not a best practice, either. If sites are served separately in production, then ideally they should be served separately in preview, too. I try to make preview servers configured identically to production servers. I often use virtual hosts to do so.

Best,

David
Re: messed up preview [ In reply to ]
David E. Wheeler wrote:
> On Mar 17, 2011, at 10:59 PM, Zdravko Balorda wrote:
>
>> I have local preview. That is, there is only one destination for previews. Otherwise,
>> each site have its own publishing destination.
>> Am I doing something wrong here?
>
> Not “wrong,” per se, but not a best practice, either. If sites are served separately in
> production, then ideally they should be served separately in preview, too. I try to make
> preview servers configured identically to production servers. I often use virtual hosts to do so.

Hi,
I may switch to this yet, but I must say I like the idea of bricolage driven preview
browser tab. It's very elegant.
If you will accept the /preview/media/UUID concept from ckeditor let me suggest
something similar so that $burner while in preview mode returns some UUID based uri instead.

Regards, Zdravko
RE: messed up preview [ In reply to ]
We use a preview server, as David described, and it is driven by the preview tab in the UI.
When you set the destination servers for preview to be a unique URI for that development instance, clicking on the preview link redirects a user to that instance when they click the link.

We have set up a server that is our development server, with virtual hosts serving each site. That development server is as identical to our production server as possible.

> -----Original Message-----
> [mailto:users@lists.bricolagecms.org] On Behalf Of Zdravko Balorda
> Sent: Tuesday, March 22, 2011 2:05 AM
>
> David E. Wheeler wrote:
> > On Mar 17, 2011, at 10:59 PM, Zdravko Balorda wrote:
> >
> >> I have local preview. That is, there is only one destination for previews. Otherwise,
> >> each site have its own publishing destination.
> >> Am I doing something wrong here?
> >
> > Not "wrong," per se, but not a best practice, either. If sites are served separately in
> > production, then ideally they should be served separately in preview, too. I try to make
> > preview servers configured identically to production servers. I often use virtual hosts to do so.
>
> Hi,
> I may switch to this yet, but I must say I like the idea of bricolage
> driven preview browser tab. It's very elegant.
> If you will accept the /preview/media/UUID concept from ckeditor let me
> suggest something similar so that $burner while in preview mode returns some
> UUID based uri instead.
>
> Regards, Zdravko
Re: messed up preview [ In reply to ]
Adam Wilson wrote:
> We use a preview server, as David described, and it is driven by the preview tab in the UI.
> When you set the destination servers for preview to be a unique URI for that development instance, clicking on the preview link redirects a user to that instance when they click the link.
>
> We have set up a server that is our development server, with virtual hosts serving each site. That development server is as identical to our production server as possible.

I may have just forgot how it works. I tried it some time ago.... :)
Does it mean also that you need a DNS entry for these virtual hosts?
I have quite a few of them.
Then, it makes a lot of trash hosts, if I may call a preview site a trash host,
which may leak to Google... I'll need to seriously dig into this.

Regards, Zdravko
RE: messed up preview [ In reply to ]
Obviously, there are lots of different ways to implement, but here is how we did it.

We have a single test server, rfxdev.com. We use this instance for our internal development team to host scripts that do things like programmatically creating new development instances of websites and checking 404 errors on our production webservers.

Then, for each website that we are managing in bricolage, we have a sub-domain created for that site. An example would be dePaulSchool.org. We have a development instance of depaulschool.rfxdev.com that corresponds with the production instance. I then have a single wild-card DNS entry that directs all traffic destined for any sub-domain of rfxdev.com to my development server.

As for search engines, that has not really been much of a concern of mine, but there are things like robots.txt that you can use that search engines should respect to prevent your development sites from being listed. Since there aren't any external links to the developments sites on our server, I haven't noticed that there are any issues with the search engines (yet).

> -----Original Message-----
> [mailto:users@lists.bricolagecms.org] On Behalf Of Zdravko Balorda
> Sent: Wednesday, March 23, 2011 3:56 AM
>
> Adam Wilson wrote:
> > We use a preview server, as David described, and it is driven by the
> preview tab in the UI.
> > When you set the destination servers for preview to be a unique URI
> for that development instance, clicking on the preview link redirects a
> user to that instance when they click the link.
> >
> > We have set up a server that is our development server, with virtual
> hosts serving each site. That development server is as identical to
> our production server as possible.
>
> I may have just forgot how it works. I tried it some time ago.... :)
> Does it mean also that you need a DNS entry for these virtual hosts?
> I have quite a few of them.
> Then, it makes a lot of trash hosts, if I may call a preview site a
> trash host,
> which may leak to Google... I'll need to seriously dig into this.
>
> Regards, Zdravko
Re: messed up preview [ In reply to ]
Let me seek for a quick fix here:
Is there a way to refresh the preview copy of media document
from template, as if it were reloaded under AUTO_PREVIEW_MEDIA set?

Regards, Zdravko
Re: messed up preview [ In reply to ]
On Mar 24, 2011, at 3:10 AM, Zdravko Balorda wrote:

> Let me seek for a quick fix here:
> Is there a way to refresh the preview copy of media document
> from template, as if it were reloaded under AUTO_PREVIEW_MEDIA set?

No, I think you have to temporarily disable that setting; or rsync your existing preview root(s).

Best,

David