Forums / Install & configuration / Problem with Language Selection / Virtual Host Mode

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.