Forums / Developer / Fixing a Bug

Fixing a Bug

Author Message

Hugo Gallo

Monday 13 October 2003 2:22:38 pm

Hi. I've found within a search of the forums, the fix to a bug I've encountered. However, being a newbie, I have no idea the correct way to implement the fix. Can someone please explain the correct way to implement the following fix? (i.e. where do I add the code in the file? Am I to over write any code? etc.)

Here is the fix for that bug.
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

Thanks! Maybe there's documentation on how to 'read' bug fixes?

Alex Jones

Monday 13 October 2003 2:37:30 pm

Hugo, what bug are you trying to fix? Can you provide a link to the page that provided that code? That should make it easier for someone to help you.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Hugo Gallo

Monday 13 October 2003 4:42:43 pm

The bug I'm trying to fix is the kernel (3) error you receive when you click >>next to see the second page of a list of objects. Here is the link to the bug fix:
http://ez.no/developer/ez_publish_3/forum/setup_design/admin_sitemap_unable_to_get_more_than_1st_page_of_objects

Marius Andreiana

Thursday 16 October 2003 3:59:06 am

Easiest is to manually edit the file kernel/classes/ezcontentobject.php
and change the line
$languageCode = $Params['LanguageCode'];
to
$languageCode = $Params['Language'];