Author
|
Message
|
Jeroen Sangers
Moderated by: Nicolas Pastorino
|
Wednesday 10 May 2006 1:30:49 am
After upgrading to version 3.8, a language selection screen appears when you post a new topic to a forum. This is very confusing for the users of the forum. Is there a way to create automatically forum posts in the default language of the current siteaccess?
|
Łukasz Serwatka
|
Wednesday 10 May 2006 1:41:12 am
Hello,
Look at this topic: http://ez.no/community/forum/setup_design/language_of_content_creation_in_the_frontend_3_8/re_language_of_content_creation_in_the_fronten__5 In case where you use only one siteaccess (one language) use e.g:
<input type="hidden" name="ContentLanguageCode" value="eng-GB" />
eZ publish should also skip page where user will choose language if there are no more than 1 languages.
Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog
|
Jeroen Sangers
|
Wednesday 10 May 2006 9:40:07 am
I have added your code to the /design/siteaccess/override/templates/edit/forum_topic.tpl file and cleared my caches, but it still asks me for the language if I create a new forum topic. Am I using the right template?
|
Łukasz Serwatka
|
Wednesday 10 May 2006 10:20:27 am
Nope, you need to put it in code where you triggering object creation, look on full view template forum_topic.tpl. How many languages do you use on your site?
Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog
|
Jeroen Sangers
|
Wednesday 10 May 2006 11:06:17 am
Thanks, that did the trick. As I have three languages, I used the multi-language code you gave in the other post.
|
Jeroen Sangers
|
Friday 12 May 2006 2:03:56 am
Is there also a way to accomplish the same for forms that are not launched through a form? E.g. the "Edit account" link, which simply links to the page /content/edit/14
After the language selection I am on page /content/edit/14/13/eng-GB
.
|
Kristof Coomans
|
Sunday 21 May 2006 11:42:02 pm
Hi Jeroen You can use /content/edit/14/f/eng-GB
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
|
André Pérez
|
Thursday 01 June 2006 4:25:51 am
Hello Kristof, I try to use your solution but I get the next error:
Fatal error: Call to a member function on a non-object in D:\aperez\Workspace\Indubanda\kernel\content\attribute_edit.php on line 85
Fatal error: eZ publish did not finish its request
The execution of eZ publish was abruptly ended, the debug output is present below.
I have investigated the error and the problem is in the call to the function "eZContentObjectVersion::fetchVersion" (ezcontentobject.php - line 936). It returns an empty object for version "f". I have upgraded my site from eZ 3.6 to eZ 3.8. Is this a bug or a problem with my database?
|
Kristof Coomans
|
Thursday 01 June 2006 4:48:46 am
Hi André It works here, so I guess the problem is on your installation. What kind of object are you trying to edit?
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
|
André Pérez
|
Thursday 01 June 2006 5:03:12 am
It's a custom object, but I have the same problem with "article" and "folder" :( Is there any script to check my database?
|
André Pérez
|
Tuesday 06 June 2006 1:53:23 am
I have found the problem and the solution :) It's a bug in eZp. The problem appears when you use /content/edit/14/f/eng-GB
and the option EditDirtyObjectAction=usecurrent
In "kernel/content/edit.php", block code from line 348 to 363:
if ( $ini->variable( 'ContentSettings', 'EditDirtyObjectAction' ) == 'usecurrent' )
{
{.......}
$version->store();
}
After "$version->store();", the code must be redirected to edit the new version like in line 436:
if ( $ini->variable( 'ContentSettings', 'EditDirtyObjectAction' ) == 'usecurrent' )
{
{.......}
$version->store();
return $Module->redirectToView( "edit", array( $ObjectID, $version->attribute( "version" ), $EditLanguage ) );
}
PS: excuse me for my poor english :P
|
Kristof Coomans
|
Tuesday 06 June 2006 2:39:08 am
Hi André Can you report it as a bug on ez.no? You can refer to this thread. Thanks!
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
|
Kristof Coomans
|
Tuesday 06 June 2006 11:51:51 pm
Hi André It seems that this was already reported: http://ez.no/bugs/view/8261 . It is fixed in svn.
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
|
André Pérez
|
Wednesday 07 June 2006 12:57:42 am
Good :) Regards.
|
/dev/null
|
Sunday 10 December 2006 8:42:21 am
I would like to see how one might use a user setting to control the default language setting in the way you describe. Some kind of user setting menu to select from available languages, storage of selection, option to prompt each time. Template logic to fetch user setting for default language to pass back to eZ publish in the way you describe. Your thoughts on this idea? <i>/dev/null</i>
eZpedia community documentation project: http://ezpedia.org
|
Stefano Maffulli
|
Wednesday 21 February 2007 3:57:06 am
/dev/null:
we have used a different approach as discussed here: http://ez.no/community/forum/setup_design/choosing_language_at_publishing_time We have created a new template:
<select name="ContentLanguageCode">
{def $site_languages=ezini('RegionalSettings', 'SiteLanguageList')}
{def $locales=fetch('content','locale_list')}
{foreach $site_languages as $lang}
{foreach $locales as $locale}
{if eq($locale.locale_code, $lang)}
<option value="{$locale.locale_code}">{$locale.language_name}</option>
{break}
{/if}
{/foreach}
{/foreach}
</select>
so that close to all our 'create' and 'edit' buttons we get a dropdown list to select the language we need. I think this solution makes the multilanguage function easier to use.
--
: Stefano Maffulli : https://www.fsfe.org/en/fellows/maffulli/
`--------+----------+--------------------------------------------------.
Join the Fellowship of FSFE http://fsfe.org
|
Luc Chase
|
Monday 18 June 2007 9:52:32 am
Also see this post... http://ez.no/community/forum/setup_design/choosing_language_at_publishing_time/re_choosing_language_at_publishing_time__5
The Web Application Service Provider
|