You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by ru...@uniklinik-freiburg.de on 2012/12/19 11:55:32 UTC
asset shown directly instead of preview
Hi lenya devs,
at the 2.1 branch the asset is shown directly instead of the preview when I
switch form the site tab to the edit tab.
In every other situation when a preview is requested the asset is shown
now. This seems to be related to the latest commits.
Best
Rudolf
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: asset shown directly instead of preview
Posted by Andreas Hartmann <an...@apache.org>.
Am 08.01.13 14:05, schrieb Andreas Hartmann:
> Hi Rudolf,
>
> Am 24.12.12 15:40, schrieb Rudolf Korhummel:
>> I found out that this is related to :
>> http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/publication/DocumentImpl.java?r1=907008&r2=1305170&pathrev=1305170&diff_format=h
>>
>>
>>
>> It was your commit rev=1305170 Do you remember the reason for this
>> change ?
>> The old version seems to work.
>
> sorry for the late reply. The reason was as follows:
>
> In a project, we are using the DefaultDocumentBuilder with an empty
> extension, i.e. document URLs have the form /foo/bar instead of
> /foo/bar.html. Without the change in question, this results in image
> URLs being generated without extensions as well, e.g. <img
> src="/foo/myimage"/>. When an image URL is requested without the
> extension though, Lenya shows the "Media Document" page, but we want the
> image to be displayed.
>
> IMO the cleanest way would be not to use extensions but the HTTP
> "Accept" header to control what media type to return. I will look into
> that. I'm not sure if all browsers send a sufficiently specific Accept
> header, though.
Side note: This would require to set the "Vary: Accept" header for
correct caching behaviour.
-- Andreas
>> Am 19.12.2012 um 11:55 schrieb rudolf.korhummel@uniklinik-freiburg.de:
>>
>>> Hi lenya devs,
>>>
>>> at the 2.1 branch the asset is shown directly instead of the preview
>>> when I
>>> switch form the site tab to the edit tab.
>>> In every other situation when a preview is requested the asset is shown
>>> now. This seems to be related to the latest commits.
>>>
>>> Best
>>>
>>> Rudolf
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
>>> For additional commands, e-mail: dev-help@lenya.apache.org
>>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: asset shown directly instead of preview
Posted by Andreas Hartmann <an...@apache.org>.
Hi Rudolf,
Am 24.12.12 15:40, schrieb Rudolf Korhummel:
> I found out that this is related to :
> http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/publication/DocumentImpl.java?r1=907008&r2=1305170&pathrev=1305170&diff_format=h
>
>
> It was your commit rev=1305170 Do you remember the reason for this
> change ?
> The old version seems to work.
sorry for the late reply. The reason was as follows:
In a project, we are using the DefaultDocumentBuilder with an empty
extension, i.e. document URLs have the form /foo/bar instead of
/foo/bar.html. Without the change in question, this results in image
URLs being generated without extensions as well, e.g. <img
src="/foo/myimage"/>. When an image URL is requested without the
extension though, Lenya shows the "Media Document" page, but we want the
image to be displayed.
IMO the cleanest way would be not to use extensions but the HTTP
"Accept" header to control what media type to return. I will look into
that. I'm not sure if all browsers send a sufficiently specific Accept
header, though.
Thanks for bringing it up and reverting my change!
-- Andreas
> Am 19.12.2012 um 11:55 schrieb rudolf.korhummel@uniklinik-freiburg.de:
>
>> Hi lenya devs,
>>
>> at the 2.1 branch the asset is shown directly instead of the preview
>> when I
>> switch form the site tab to the edit tab.
>> In every other situation when a preview is requested the asset is shown
>> now. This seems to be related to the latest commits.
>>
>> Best
>>
>> Rudolf
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: dev-help@lenya.apache.org
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: asset shown directly instead of preview
Posted by Rudolf Korhummel <ru...@korhummel.de>.
Hi Andreas,
I found out that this is related to :
http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_1_X/src/impl/java/org/apache/lenya/cms/publication/DocumentImpl.java?r1=907008&r2=1305170&pathrev=1305170&diff_format=h
It was your commit rev=1305170 Do you remember the reason for this
change ?
The old version seems to work.
Regards
Rudolf
Am 19.12.2012 um 11:55 schrieb rudolf.korhummel@uniklinik-freiburg.de:
> Hi lenya devs,
>
> at the 2.1 branch the asset is shown directly instead of the preview
> when I
> switch form the site tab to the edit tab.
> In every other situation when a preview is requested the asset is
> shown
> now. This seems to be related to the latest commits.
>
> Best
>
> Rudolf
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org