Problem with Language Selection / Virtual Host Mode

Author Message

Bert Slachter

Saturday 05 January 2008 6:49:35 am

I'm an ezpublish newbie (to be honest, I'm tired of Typo3). For evaluation purposes I installed a brand new 4.0.0 version / ezwebin site at http://ezpublish.berflo.com

After installation, the Search Function did not work (known problem). To make it work, I had to set ForceVirtualHost to TRUE in site.ini Global Override. Now, the Search function and the complete sample site work fine, BUT: The language selectors on the top left in the header do not work because there is an index.php? generated in the URL and the language selection:

http://ezpublish.berflo.com/index.php?/eng is generated and displays error message
http://ezpublish.berflo.com/eng generates the correct site

Most confusing, the other right-sided buttons in the same header bar (Login, Register, Tag Cloud, etc.) work fine. Just try it and visit my URL.

All other links on the pages generate the correct urls without index.php? I already digged into the different files, but couldn't find a solution.

Can anyone help? Thanks in advance

André R.

Saturday 05 January 2008 9:18:41 am

The url was generated when you installed the site, to change it you simply login to the front page and hit 'site settings'. There should be a language matrix in the bottom with urls and lables.

EDIT: Oh, and don't forget to do it for all your languages (if the site settings object is already translated..)

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Bert Slachter

Monday 07 January 2008 1:26:56 am

Thanks for your comment.However the problem remains. I corrected the URL's, I deleted any */index.php? in all .ini and settings files, I even added an alias URL.

Everything works perfect for one language, but as soon as you use the >>Eng >>Ger >>Dut selectors in the header bar, an /index.php? is generated in the URL and the error message is displayed.

I even made a complete fresh install with one language only, and changed the URL name during installation wizard from ezpublish.berflo.com/index.php? to ezpublish.berflo.com

When I then added a second language via the Admin Panel, again */index.php?/eng is generated instead of *./eng

Again, for me it is difficult to understand why the Login/Register/SiteMap/Tag Cloud links work fine, but the language selectors don't. For me it looks like there is something wrong in the generation of the language links. Unfortunately, I do have to use three languages. So for me this is really a knock-out criteria.

My site is running at a commercial ISP, in the same webspace I am running a complete Typo3 site, Gallery2, Wordpress and Wikipedia without any problems. Only ez makes this kind of hickups. Here's my system information:

Site: ezpublish.berflo.com
Version: 4.0.0 (4.0.0)
SVN revision: 19785
Extensions: ezwebin , ezdhtml , ezodf
PHP
Version: 5.2.3-0.dotdeb.1
Extensions: zip, xmlwriter, libxml, dom, xmlreader, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, session, pcre, SimpleXML, sockets, soap, SPL, shmop, standard, Reflection, posix, mime_magic, mbstring, json, iconv, hash, gettext, ftp, filter, exif, dbase, dba, date, ctype, calendar, bz2, bcmath, zlib, openssl, cgi-fcgi, curl, gd, imap, mcrypt, mhash, mysql, mysqli, PDO, pdo_mysql, suhosin
Miscellaneous: Safe mode is off.
Basedir restriction is on and set to /var/www/NFleischm:/var/www/system/htdocs/:/usr/share/php.
Global variable registration is off.
File uploading is enabled.
Maximum size of post data (text and files) is 20M.
Script memory limit is 148M.
Maximum execution time is 330 seconds.

Here is a copy of my .htaccess file in the ezpublish document root:

# Copy this file to a new file called .htaccess in your eZ Publish root
# to make the site more secure in non-virtualhost mode (index.php used in urls).
#

### php_admin_value and php_value can only be used with mod_php. My ISP has Fast-CGI and these command produce errors. Thus, it's commented out.
#php_value allow_call_time_pass_reference 0

<FilesMatch "(index\.php|\.(gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf)$">
order allow,deny
allow from all
</FilesMatch>

RewriteEngine On
RewriteRule content/treemenu/?$ index_treemenu.php
RewriteRule index_treemenu.php - [L]

RewriteRule !\.(gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf$ index.php

DirectoryIndex index.php

Bert Slachter

Monday 07 January 2008 3:02:01 am

Oooops - Sorry! I finally found it! Forget my last post, it's working perfectly now!

Francois SIMON

Monday 28 April 2008 11:25:24 pm

Hello,

I have the same kinf of problem, with the tag clouds, i am using different languages, but the tag clouds are language specific, if for example i am in the english page and check the tag clouds, i get the one of the different languages as well, i would like them to be be specific to one language. How can i do it?

Thank you in advance

Bruce Morrison

Tuesday 29 April 2008 12:48:16 am

Hi Francois

I've recently done some work with the tag clouds. Interestingly they are part of the ezwebmin (& possibly ezflow) components and not the core eZ publish distribution. While I can't seem to find a reference I seem to recall they were once user contributions (could be wrong here).

While I didn't come across your issue, I did find some issues with the way the keywords are retrieved and counted. There are much more efficient ways of retrieving the data.

Looking at the template operator ( extension/ezwebin/autoloads/eztagcloud.php )
there appears to be a language filter in the SQL

eZContentLanguage::languagesSQLFilter( 'ezcontentobject' ))

which should limit the keywords in the cloud to those set in site.ini

[RegionalSettings]
SiteLanguageList

Are you using multiple languages within the same siteacess?

http://pubsvn.ez.no/doxygen/trunk/html/ezcontentlanguage_8php-source.html#l00622
http://pubsvn.ez.no/doxygen/trunk/html/ezcontentlanguage_8php-source.html#l00309

HTH
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Francois SIMON

Tuesday 29 April 2008 10:38:53 pm

Hi Bruce

Thank you for your help. Yes I am using multiple languages for the same site acess.

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 18 2025 19:12:29
Script start
Timing: Jan 18 2025 19:12:29
Module start 'layout'
Timing: Jan 18 2025 19:12:29
Module start 'content'
Timing: Jan 18 2025 19:12:30
Module end 'content'
Timing: Jan 18 2025 19:12:30
Script end

Main resources:

Total runtime0.6883 sec
Peak memory usage4,096.0000 KB
Database Queries73

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 588.1641152.6563
Module start 'layout' 0.00620.0039 740.820339.5078
Module start 'content' 0.01000.6767 780.3281683.2500
Module end 'content' 0.68670.0016 1,463.578120.1094
Script end 0.6883  1,483.6875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4983160.0002
Check MTime0.00140.2048160.0001
Mysql Total
Database connection0.00100.142110.0010
Mysqli_queries0.608288.3627730.0083
Looping result0.00080.1192710.0000
Template Total0.653294.920.3266
Template load0.00230.332520.0011
Template processing0.650994.560820.3254
Template load and register function0.00020.033010.0002
states
state_id_array0.00180.257210.0018
state_identifier_array0.00130.184020.0006
Override
Cache load0.00220.3194740.0000
Sytem overhead
Fetch class attribute can translate value0.00130.192340.0003
Fetch class attribute name0.00130.185790.0001
XML
Image XML parsing0.00130.183340.0003
class_abstraction
Instantiating content class attribute0.00000.002790.0000
General
dbfile0.00090.1355230.0000
String conversion0.00000.001140.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
18content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
9content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 40
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs