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'];

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 01:14:15
Script start
Timing: Jan 31 2025 01:14:15
Module start 'layout'
Timing: Jan 31 2025 01:14:15
Module start 'content'
Timing: Jan 31 2025 01:14:15
Module end 'content'
Timing: Jan 31 2025 01:14:15
Script end

Main resources:

Total runtime0.0227 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0038 588.0078151.1953
Module start 'layout' 0.00380.0039 739.2031220.6406
Module start 'content' 0.00770.0136 959.8438997.7578
Module end 'content' 0.02130.0014 1,957.601633.9922
Script end 0.0227  1,991.5938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002310.0746140.0002
Check MTime0.00094.1595140.0001
Mysql Total
Database connection0.00062.632810.0006
Mysqli_queries0.00188.119730.0006
Looping result0.00000.109110.0000
Template Total0.00104.410.0010
Template load0.00083.415610.0008
Template processing0.00020.981110.0002
Override
Cache load0.00052.108110.0005
General
dbfile0.00219.416780.0003
String conversion0.00000.030440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs