On 12/13/05, Annie Dumont <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] a écrit : > On 12/13/05, Annie Dumont <[EMAIL PROTECTED]> wrote: > When you go in the authoring-tab of lenya, you can edit a document with > Kupu, insert a picture, then save and exit of kupu : you are supposed > to see the picture you just have inserted in the authoring-tab "preview" > of your document. > But, in our publication we have two cases : > you belong to the group reviewer and editor, with edit and publish right > on all the sitetree : you can see the picture you have inserted with > kupu in the authoring-tab. > you belong to another group with rights restricted to a part of the > sitetree : > - you see the picture in Kupu > - you see the picture in the live view > - but you don't see the picture in the authoring view > Does anybody know how to fix this ? > PS : we use cocoon 2.1.7 and lenya 1.2.3 > > This is probably a relative URL issue. > - What is the IMG SRC parameter when looking in the Source in Kupu? > This is a relative one > <img src="test/Souris.jpg" ismap="ismap" alt="" border="0" height="519" > width="460"> > - What is the URL of the Authoring tab? > http://our_server.fr/lenya_directory/our_pub/authoring/universite/test.html > What is the SRC parameter > when looking at the source of the page in the browser? > <script>img('test/Souris.jpg', 519, 460)</script> > > with the js function img : > function img(url, hauteur, largeur) > { > if (largeur>410) > { > document.write('<div style="block:table-cell"><img > src="' + url + > '" width="410px" border="0" height="' + Math.floor(hauteur*410/largeur) + > '"/>&l > t;/div>'); > } > else if (largeur>=0) > { > document.write('<img src="' + url + '" width="' + largeur +'" height= > "' + hauteur + '"/>'); > } > else > { > document.write('<img src="' + url + '"/>'); > } > } > - What is the URL of the live version? > http://our_server.fr/lenya_directory/our_pub/live/universite/test.html > What is the SRC parameter when > looking at the source of the page in the browser? > <div> > <script>img('test/Souris.jpg', 519, 460)</script> > </div> > > With that information, we can figure the complete path of the IMG. > Then decide why some people do not have access to the IMG for certain > cases. > > Are you using MSIE or Mozilla for editing? for viewing? > I am using firefox for editing and viewing, MSIE only for viewing > > MSIE can > damage URLs when saving from Kupu. (That will be evident from the > above information.) MSIE displays a box with an X when an image file > is not available. Mozilla shows nothing, pretending the IMG tag does > not exist, if the file is not available. > > I verify : under MSIE, when the picture doesn't display for user with > restricted rights : no red X in place and the source is the same : > <div> > <script>img('test/Souris.jpg', 519, 460)</script> > </div> > Does the image appear properly after publishing the page? > Yes, that's the entire mystery ! I need the image to be displaid in the > authoring-tab because my users will be disturbed by no seeing what they did, > even if its done. > I don't understand, how with the same code, it can be sometimes displaid > and sometimes not :(
The image in the Authoring section is at: http://our_server.fr/lenya_directory/our_pub/authoring/universite/test/Souris.jpg Test that URL in a browser with a "bad" login. Assuming my theory below is correct, it should work. You should have mentioned that JS was involved. The JS function is not in the HEAD when in the Authoring section because Lenya wraps the content page with the CMS GUI, so the JS is not loaded before the page is loaded, so the document.writes never happen. That explains why no red X displays in MSIE; all it sees is a SCRIPT tag calling an unavailable function. Try adding your img() function to: \build\lenya\webapp\lenya\resources\menu\menu.js It should work now. A better solution is for Lenya to combine the HEAD of the content with the HEAD of the CMS GUI. This should happen in: \build\lenya\webapp\lenya\xslt\menu\menu2xslt.xsl A quick read of Lenya 1.2.2's version suggests that if the content contains a HEAD tag, the page will contain two HEAD tags. (I hope I am wrong. I'll test tomorrow if you do not confirm it.) Check the source of the page in the Authoring section. Does it have 2 HEAD tags? Where is the img() function? solprovider --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
