[Seaside] Weird problem with libraries

John McKeon p3anoman at gmail.com
Wed Jul 15 04:07:40 UTC 2009


On Tue, Jul 14, 2009 at 11:06 PM, Mariano Martinez Peck <
marianopeck at gmail.com> wrote:

>
>
> On Tue, Jul 14, 2009 at 11:21 PM, John McKeon <p3anoman at gmail.com> wrote:
>
>> I'm going to take a wild guess and bet you are still running behind the
>> lightppd webserver I believe you mentioned in another post.
>>
>
>
> are you god ?  hahahah . Yes I am. But I am not serving css or js, just
> photos. I mean in /var/www/   I have only pictures. I even don't map
> /seaside/files to something in /var/www
>
> My lighttp.conf is the default one
>
> Is this wrong ? I dont understand :(
>

This is proof that the user agent is calling back to the server for the
content referred to in those links. Whether they point to a local
subdirectory (to the server) or some other domain entirely.
The page is telling the server "give me the page at
\seaside\files\SULibrary\etc" but there is no such directory as far as the
lightppd server knows. You have to tell lightppd to redirect such requests
to localhost:xxxx OR (and I could be mistaken on this) put the files in the
correctly defined subdirectory where the server can find them. (The library
config page's "write files to disk" link is useful for this). The way to
redirect is simple. Tudor Girba, I believe, wrote up a brief tutorial on
www.piercms.com for apache. lightppd is probably very similar but i have no
idea.

John

>
>
> Thanks!
>
> Mariano
>
>
>>
>> On Tue, Jul 14, 2009 at 8:25 PM, Mariano Martinez Peck <
>> marianopeck at gmail.com> wrote:
>>
>>> Hi folks,
>>>
>>> I have a problem with a library. I am using a Pier Gallery addon that
>>> uses Prototype.js, scriptaculus, builder, effects, etc. My application
>>> DOESN'T  have SULibrary added. It has it's own library called
>>> DestinoMochilaLibrary with this method:
>>>
>>>
>>> DestinoMochilaLibrary>>selectorsToInclude
>>>     ^ #(destinoMochilaCss)
>>>
>>>
>>> Now, to be able to use that plugin I override the method updateRoot: like
>>> this:
>>>
>>> DestinoMochilaLibrary>>updateRoot: aHtmlRoot
>>>     super updateRoot: aHtmlRoot.
>>>     aHtmlRoot javascript url: '
>>> http://www.roard.com/lightbox2/js/prototype.js'.
>>>     aHtmlRoot javascript url: '
>>> http://www.roard.com/lightbox2/js/scriptaculous.js?load=effects,builder
>>> '.
>>>     aHtmlRoot javascript url: '
>>> http://www.roard.com/lightbox2/js/lightbox.js'.
>>>     aHtmlRoot stylesheet url: '
>>> http://www.roard.com/lightbox2/css/lightbox.css'
>>>
>>> Obviously this is not good because I am requesting another website. Thus,
>>> I wanted to have it locally. Then I did this:
>>> - Add SULibrary to my application
>>> - Downloaded the http://www.roard.com/lightbox2/js/lightbox.js and
>>> http://www.roard.com/lightbox2/css/lightbox.css because they are not in
>>> SULibrary.
>>> - Then I uploaded both files to SULibrary and I could perfectly see the
>>> new methods lightboxJs and lightboxCss in SULibrary.
>>> - I can also see all links in
>>> http://localhost:8888/seaside/files/SULibrary/
>>> - Removed DestinoMochilaLibrary>>updateRoot:
>>>
>>> The problem is that if I remove the DestinoMochilaLibrary>>updateRoot:
>>> (which should be not used now), the plugin doesn't work. It is like if
>>> cannot find the javascript libraries.
>>>
>>> Let's take the example of protoype. In the first version, my html
>>> rendered shows:
>>>
>>> <script type="text/javascript" src="
>>> http://www.roard.com/lightbox2/js/prototype.js"></script>
>>>
>>> which is correct. After my changes, I see:
>>>
>>> <script type="text/javascript"
>>> src="/seaside/files/SULibrary/prototype.js"></script>
>>>
>>> which I think it is also correct.
>>>
>>> Now...what can be the problem that the plugin doesn't work ???
>>>
>>>
>>> More information. If I change my code to this:
>>>
>>>
>>> updateRoot: aHtmlRoot
>>>     super updateRoot: aHtmlRoot.
>>>     aHtmlRoot javascript url: '
>>> http://localhost:8888/seaside/files/SULibrary/prototype.js'.
>>>     aHtmlRoot javascript url: '
>>> http://localhost:8888/seaside/files/SULibrary/builder.js'.
>>>     aHtmlRoot javascript url: '
>>> http://localhost:8888/seaside/files/SULibrary/effects.js'.
>>>     aHtmlRoot javascript url: '
>>> http://localhost:8888/seaside/files/SULibrary/lightbox.js'.
>>>     aHtmlRoot stylesheet url: '
>>> http://localhost:8888/seaside/files/SULibrary/lightbox.css'
>>>
>>> It works perfect!! But I don't think I have to do this...I must be doing
>>> something wrong.
>>>
>>> Thanks a lot for the help in advance.
>>>
>>> Mariano
>>>
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> seaside at lists.squeakfoundation.org
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>>
>>
>>
>> --
>> http://jmck.seasidehosting.st
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>


-- 
http://jmck.seasidehosting.st
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20090715/27825ea3/attachment.htm


More information about the seaside mailing list