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

eZ debug

Timing: Jan 18 2025 22:32:09
Script start
Timing: Jan 18 2025 22:32:09
Module start 'content'
Timing: Jan 18 2025 22:32:10
Module end 'content'
Timing: Jan 18 2025 22:32:10
Script end

Main resources:

Total runtime0.8793 sec
Peak memory usage4,096.0000 KB
Database Queries206

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 588.8438180.8359
Module start 'content' 0.00670.7295 769.6797592.5859
Module end 'content' 0.73620.1430 1,362.2656341.0625
Script end 0.8792  1,703.3281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.4858210.0002
Check MTime0.00150.1663210.0001
Mysql Total
Database connection0.00080.095210.0008
Mysqli_queries0.795690.48292060.0039
Looping result0.00220.24502040.0000
Template Total0.846696.320.4233
Template load0.00200.224220.0010
Template processing0.844796.062320.4223
Template load and register function0.00010.016410.0001
states
state_id_array0.00160.181310.0016
state_identifier_array0.00150.174920.0008
Override
Cache load0.00180.2009560.0000
Sytem overhead
Fetch class attribute can translate value0.00170.189330.0006
Fetch class attribute name0.00150.167480.0002
XML
Image XML parsing0.00080.095630.0003
class_abstraction
Instantiating content class attribute0.00000.0025100.0000
General
dbfile0.00340.3812270.0001
String conversion0.00000.001130.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs