To change start page I've added in site.ini.append.php file in SiteSettings section:
[SiteSettings] IndexPage=/content/view/full/134/ DefaultPage=/content/view/full/134/
I had a problem witch language switching on site where I use two addresses: mysite.eu and mysite.pl. One in English and second in Polish of course (how to do this I've described years ago). After some changes I could change language from English to Polish, but not from Polish to English. Even change from English to English redirect me to mysite.pl (in Polish).
The solution is to check settings/override/site.ini.append.php file. The default installation places there all settings including SiteURL=mysite.pl (in SiteSettings section). Of course in my case (two different addresses) the SiteURL can be defined only in settings/siteaccess/eng/site.ini.append.php and settings/siteaccess/pol/site.ini.append.php files. The values are SiteURL=mysite.eu in first file and SiteURL=mysite.pl in second one.
Now switching works great in both directions.
I've noticed that in one of my old pages, based on ezPublish 4.4 ezcache script does not do anything.
I've found solution. You have to applay patch to kernel/classes/ezcache.php file. Diff looks like this:
--- kernel/classes/ezcache.php-2015-06-10 2012-05-22 18:40:06.000000000 +0200 +++ kernel/classes/ezcache.php 2015-06-11 00:30:00.126363504 +0200 @@ -451,10 +451,12 @@ $cacheItem['iterationSleep'] = $iterationSleep; $cacheItem['iterationMax'] = $iterationMax; $cacheItem['expiry'] = $expiry; - $functionName = 'function'; + $functionName = false; if ( $purge && isset( $cacheItem['purge-function'] ) ) $functionName = 'purge-function'; - if ( isset( $cacheItem[$functionName] ) ) + else if ( !$purge && isset( $cacheItem['function'] ) ) + $functionName = 'function'; + if ( $functionName ) { $function = $cacheItem[$functionName]; if ( is_callable( $function ) )
Now command
php bin/php/ezcache.php --clear-all --purge
works.
If You want to change Recipient or Email in Feedback form You have to made changes in language which is set as Main.
If not changes in Recipient attribute is discarded and Email is not accessible.
It's simple, but it takes me half an hour to change e-mail address ;-)
LDAP authentication is build in eZ Publish by default - the only thing to do is configuration.
To use LDAP you have to add line
LoginHandler[]=LDAP
in settings/override/site.ini.append.php file in section UserSettings. In my file it looks like this:
[UserSettings] LogoutRedirect=/ LoginHandler[]=LDAP
In new file settings/override/ldap.ini.append.php you have to specify all connection settings. In my case it looks like this:
[LDAPSettings] LDAPServer=127.0.0.1 LDAPBaseDn=ou--users,dc--jaqb,dc--gda,dc--pl LDAPBindUser=cn--ldap-connect-user,ou--users,dc--jaqb,dc--gda,dc--pl LDAPBindPassword=SecretPassword
The double minus sign is entered instead of equal sign. You can change this using LDAPEqualSign variable.
As you can see, I've created special user only to bind to LDAP server, because my server doesn't allow anonymous bind and you have to enter password in plain text.
When you clear ini cache you can login using LDAP account.
Earlier I've described how to chose proper language depending on domain. When you want to smoothly switch between these two languages you have to comment out SiteURL entry in settings/override/site.ini.append.php file and set this variable in config files of each language.
I have two directories in settings/siteaccess: pol and eng, so I've add in section SiteSettings
SiteURL=www.somedomain.pl
in file settings/siteaccess/pol/site.ini.append.php, and
SiteURL=www.somedomain.eu
in file settings/siteaccess/eng/site.ini.append.php.
Skoro już mam postawionego LDAP to przydałoby się wykorzystać ich również do logowania się do strony. Robi się to bardzo prosto.
W pliku ezpublish_legacy/settings/override/site.ini.append.php (dla starszych wersji bez ezpublish_legacy) w sekcji UserSettings trzeba dopisać
LoginHandler[]=LDAP
a następnie skonfigurować parametry połączenia. Ja skopiowałem plik settings/ldap.ini do settings/override/ldap.ini.append.php i tam zmieniłem:
LDAPServer=ldap.domain.local LDAPBaseDn=ou--Users,ou--MyOrganization,dc--domain,dc--local LDAPBindUser=someuser LDAPBindPassword=somepassword
(w zasadzie w tym pliku wystarczy zrobić tylko powyższe wpisy w sekcji LDAPSettings) po przeładowaniu plików ini w panelu administracyjnym mogłem się zalogować kontem z LDAP.
Do działania oczywiście potrzebna jest obsługa LDAP w PHP, w CentOS pakiet nazywa się (cóż za niespodzianka!) php-ldap.
Plan był taki, żeby strona wyświetlała się w języku polskim jak się wejdzie z adresu polskiego (.pl) i po angielsku jak się wejdzie z adresu europejskiego (.eu).
Najpierw skonfigurowałem serwer WWW (apache), żeby obydwie domeny miały ten sam DocumentRoot. Postawiłem standardowo eZ'ta na jednym z adresów. Następnie w pliku settings/override/site.ini.append.php zmieniłem w sekcji SiteAccessSettings:
MatchOrder=uri
na
MatchOrder=uri;host HostMatchType=map
i dopisałem
HostMatchMapItems[]=www.stona1.pl;pol HostMatchMapItems[]=www.strona2.eu;eng
teraz domyślny język zależy od adresu z którego się wejdzie.
Podczas przenoszenia strony trzeba wykonać następujące kroki:
- przenieść pliki
- przenieść bazę
- zmodyfikować pliki settings/siteaccess/*/site.ini.append.php (trzeba wskazać nowe ustawienia bazy)
- wyczyścić cache - ręcznie (lub nie przenosić plików tymczasowych)
Ostatni krok jest ważny - jak nie wyczyściłem pamięci to dostawałem tylko komunikat: "You do not have permission to access this area".
Do wygenerowania pliku sitemap.xml można użyć rozszerzenia gg XML View. Wg. informacji autora z forum nie zadziała bez doszlifowania, ale to nie powinien być już problem.
Add comment