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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 01:05:59
Script start
Timing: Jan 19 2025 01:05:59
Module start 'layout'
Timing: Jan 19 2025 01:05:59
Module start 'content'
Timing: Jan 19 2025 01:06:01
Module end 'content'
Timing: Jan 19 2025 01:06:01
Script end

Main resources:

Total runtime1.9095 sec
Peak memory usage4,096.0000 KB
Database Queries69

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0084 589.1563152.6250
Module start 'layout' 0.00840.0053 741.781339.4453
Module start 'content' 0.01371.8944 781.2266587.5078
Module end 'content' 1.90810.0014 1,368.734420.1641
Script end 1.9094  1,388.8984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.1857160.0002
Check MTime0.00140.0730160.0001
Mysql Total
Database connection0.00100.051210.0010
Mysqli_queries1.811694.8721690.0263
Looping result0.00080.0405670.0000
Template Total1.831895.920.9159
Template load0.00220.112820.0011
Template processing1.829795.820120.9148
Template load and register function0.00010.007810.0001
states
state_id_array0.00640.336310.0064
state_identifier_array0.00200.104620.0010
Override
Cache load0.00200.1024560.0000
Sytem overhead
Fetch class attribute can translate value0.00460.239420.0023
Fetch class attribute name0.00220.114280.0003
XML
Image XML parsing0.00100.051520.0005
class_abstraction
Instantiating content class attribute0.00000.0014100.0000
General
dbfile0.02001.0492160.0013
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs