Forums / Developer / Offsets not working -> Object not available / reported bugs ..
Jørgen Skogstad
Saturday 03 May 2003 11:25:17 pm
Kindest ..
It seems that I have run into the same problems as a few other people here. I see there are two reported bugs with respect to offsets;
http://www.ez.no/developer/ez_publish_3/bug_reports/slideshow_or_offset_wont_work_anymorehttp://www.ez.no/developer/ez_publish_3/bug_reports/navigator_offset_page_commands_fail_object_not_available
Have anyone actually gotten this to work? I am working with 3.0.2 og Ez .. and this is as "always" an urgent fix.
Any comments from the Ez people?
Kindest,Jørgen Skogstad
Sunday 04 May 2003 6:12:46 am
Just a note .. I just downgraded to v3.0-1 and now the offset thing works. Something must have changed ..
.. anywyas; it seems that the database structure is the same between v3.0-1 and v3.0-2 .. so I will continue with the v3.0-1 for the time being until this bug has been fixed.
Just thought you guys wanted to know!
Sergiy Pushchin
Wednesday 07 May 2003 12:44:30 am
Fixed. Index: kernel/classes/ezcontentobject.php =================================================================== --- kernel/classes/ezcontentobject.php (revision 2412) +++ kernel/classes/ezcontentobject.php (working copy) @@ -1680,7 +1680,7 @@ include_once( 'kernel/classes/datatypes/ezuser/ezuser.php' ); include_once( 'kernel/classes/ezuserdiscountrule.php' ); $user =& eZUser::currentUser(); - $languageCode = $Params['LanguageCode']; + $languageCode = $Params['Language']; $language = $languageCode; if ( $language == '' ) $language = eZContentObject::defaultLanguage(); Index: kernel/content/view.php =================================================================== --- kernel/content/view.php (revision 2412) +++ kernel/content/view.php (working copy) @@ -48,7 +48,7 @@ $ViewMode = $Params['ViewMode']; $NodeID = $Params['NodeID']; $Module =& $Params['Module']; -$LanguageCode = $Params['LanguageCode']; +$LanguageCode = $Params['Language']; $Offset = $Params['Offset'];
if ( !is_numeric( $Offset ) ) Index: kernel/content/module.php =================================================================== --- kernel/content/module.php (revision 2412) +++ kernel/content/module.php (working copy) @@ -75,7 +75,7 @@ "functions" => array( 'read' ), "default_navigation_part" => 'ezcontentnavigationpart', "script" => "view.php", - "params" => array( "ViewMode", "NodeID", "LanguageCode" ), + "params" => array( "ViewMode", "NodeID" ), "unordered_params" => array( "language" => "Language", "offset" => "Offset" ) );
Adolfo Barragán
Thursday 08 May 2003 5:03:55 am
Ok, but...How can I apply these changes?
Friday 09 May 2003 1:15:53 am
Two ways. One is using 'patch' command in unix another is by ha nands.
You need to modify three files: kernel/classes/ezcontentobject.php go to line 1680 look for line down and modify the string $languageCode = $Params['LanguageCode']; to$languageCode = $Params['Language'];
If you see in you should just modify line marked with '-' to line marked with '+'
kernel/content/view.php $LanguageCode = $Params['LanguageCode']; to$LanguageCode = $Params['Language'];
kernel/content/module.php "params" => array( "ViewMode", "NodeID", "LanguageCode" ), to"params" => array( "ViewMode", "NodeID" ),