Forums / Setup & design / long links are shortened

long links are shortened

Author Message

Pascal France

Tuesday 18 November 2008 11:30:09 am

Hi,

I have a trouble with OE 4.2.3 when I create long links.
I want to creat a link with this href:

http://mysite.fr/var/plain_site/storage/images/ez_publish__1/articles_divers/how_to_create_ez_publish_forms_comment_creer_des_formulaires_avec_ez_publish__1/collected_information_form_functions_road_map/15963-1-fre-FR/collected_information_form_functions_road_map.png

But when I publish my article the link becomes:

http://mysite.fr/var/plain_site/storage/images/ez_publish__1/articles_divers/how_to_create_ez_publish_forms_comment_creer_des_formulaires_avec_ez_publish__1/collected_information_form_functions_road_map/15963-1-fre-FR/collected_information_form_functio

I have read this post:

http://ez.no/developer/forum/setup_design/long_link_names_shortened/re_long_link_names_shortened

but I don't see any shorten fonction in:

design/standard/templates/content/datatype/view/ezxmltags/link.tpl

Of course, I have the same problem when I want to create an image link.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Maxime Thomas

Tuesday 18 November 2008 11:29:03 pm

Try this operator :

http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_operators/strings/shorten

You can use it by editing a template.

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Pascal France

Wednesday 19 November 2008 2:10:03 pm

Hi Maxime,

I have tried the shorten operator in design/standard/templates/content/datatype/view/ezxmltags/link.tpl and it works fine. I mean, if I put:

<a href={$href|ezurl|shorten(50)}....

the link is well cut.
But even I put:

<a href={$href|ezurl|shorten(500)}....

I link is cut as describ in my first message.

Is it possible that the trouble come from Apache or elsewhere ?

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Maxime Thomas

Wednesday 19 November 2008 11:53:53 pm

Sorry, I didn't understand what you want to do.

Actually, you can't do that for a very simple reason : images are handled by ez so you can't manage yourself your images.

By the way, a good reading : http://ez.no/doc/ez_publish/technical_manual/4_0/concepts_and_basics/url_translation

What is exactly the problem you have in OE ?

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Pascal France

Thursday 20 November 2008 9:22:46 am

Hi Maxime,

My problem is really simple.
If I create, with OE, a simple link whith this href (I fail consciously http:// ):

mysite.fr/var/plain_site/storage/images/ez_publish__1/articles_divers/how_to_create_ez_publish_forms_comment_creer_des_formulaires_avec_ez_publish__1/collected_information_form_functions_road_map/15963-1-fre-FR/collected_information_form_functions_road_map.png

then OE truncates it which becomes:

mysite.fr/var/plain_site/storage/images/ez_publish__1/articles_divers/how_to_create_ez_publish_forms_comment_creer_des_formulaires_avec_ez_publish__1/collected_information_form_functions_road_map/15963-1-fre-FR/collected_information_form_functio

It missing «ns_road_map.png» at the end of the link. So, if I follow the link I get a 404 error.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Maxime Thomas

Thursday 20 November 2008 11:51:56 am

Is your eZ instance running under windows ?

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Pascal France

Thursday 20 November 2008 12:57:14 pm

No, Linux Debian:

Linux 2.6.21.1
PHP 4.4.7
Apache 3.3.37
eZP 3.9.3
OE 4.2.3

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish