Page 4 of 7

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Tue Oct 12, 2010 9:21 pm
by dy3g0s
Great!!!, thank you

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Thu Oct 21, 2010 4:42 pm
by Porksd
Thank You!!!!!

IT WORKS FINE!!!!!

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Sat Nov 06, 2010 2:30 pm
by njamal
Thank you so much for this ! I dont understand what happened. all was working well and then yesterday we got the error. i am amazed that yours was the only post i found on the error and you managed to help me fix in just like that! I am never this lucky.

thank you again!

Nas

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Mon Nov 15, 2010 4:47 pm
by zarkas
kjellhahlen wrote:
fix_joomla_10x_php_530.zip
I wrote a fix. My version is Joomla 1.0.13 but I suppose it will not be very different for later versions.
Thanks a bunch, worked just great and solved my problem after moving to a new server.

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Fri Nov 19, 2010 6:32 pm
by ethlsu
Dear All,

I've downloaded your fixes (_10x as well as _1015), however unfortunately it doesn't work.
The files are placed in the indicated path.
Below is the system info.

Any idea is warmly welcome?

Regards
Laszlo

PHP built On: Linux ambient 2.6.32-bpo.4-amd64 #1 SMP Thu Apr 8 10:20:24 UTC 2010 x86_64
Database Version: 5.0.51a-24+lenny4-log
PHP Version: 5.3.3-3
Web Server: Apache/2.2.16 (Debian)
WebServer to PHP interface: apache2handler
Joomla! Version: Joomla! 1.0.15 Stable [ Daytime ] 22 February 2008 23:00 UTC

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Sat Nov 27, 2010 11:16 am
by fransjoseph
kjellhahlen wrote:
fix_joomla_10x_php_530.zip
I wrote a fix. My version is Joomla 1.0.13 but I suppose it will not be very different for later versions.

You sould replace two files by the ones in the attachment:

/includes/Cache/Lite/Function.php
(this solves the "Reference instead of value"-problem)
/includes/vcard.class.php
(to make the contact form work again)

If you rather add the changes by hand:
The changes to vcard.class.php are minor, look for:

Code: Select all

if(!function_exists('quoted_printable_encode'))
In Function.php I added a this line twice:

Code: Select all

$arguments = $this->fixCalls($arguments);
The new function (fixCalls) is added at the end of the file.
Kjell Thank you. This worked fantastic.
Best regards, Frans Joseph

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Fri Dec 03, 2010 7:27 am
by christianapr
You're my hero

thanks!!

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Sun Jan 02, 2011 2:25 am
by jaddi1
Thanks a lot for the fix. Works great!

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Wed Jan 26, 2011 8:40 am
by coeslazio
kjellhahlen wrote:
fix_joomla_10x_php_530.zip
I wrote a fix. My version is Joomla 1.0.13 but I suppose it will not be very different for later versions.

You sould replace two files by the ones in the attachment:

/includes/Cache/Lite/Function.php
(this solves the "Reference instead of value"-problem)
/includes/vcard.class.php
(to make the contact form work again)

If you rather add the changes by hand:
The changes to vcard.class.php are minor, look for:

Code: Select all

if(!function_exists('quoted_printable_encode'))
In Function.php I added a this line twice:

Code: Select all

$arguments = $this->fixCalls($arguments);
The new function (fixCalls) is added at the end of the file.

Grazie... from italy (Rome)!! thanks!! have solved the problem of my site joomla... ;)

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Sat Jan 29, 2011 5:40 pm
by wm85
kjellhahlen, BIG BIG thankx!!!

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Wed Feb 09, 2011 3:16 pm
by Parvus
@kjellhahlen Well, by now you must be pretty bored hearing this, but I'm compelled to thank you too. Three sites from a friend of mine were resurrected in minutes thanks to your post. He keeps saying he will upgrade 'soon', and has found yet another reason to continue to do so :laugh:

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Mon Feb 21, 2011 12:58 pm
by translatum
Did anyone manage to fix the eregi functions in sef.php? I.e.

Code: Select all

Deprecated: Function eregi() is deprecated in ...public_html/includes/sef.php on line 393
I tried but failed.

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Wed Feb 23, 2011 7:20 pm
by riefvan
Much appreciated for your share kjellhahlen. It saved me many productive hours.

php 5.3.5

Posted: Wed Mar 02, 2011 6:31 pm
by tomtomtomtom
good morning,
This two files fix my white page of my content of joomla 1.0.15 but i've still this error :
Deprecated: Assigning the return value of new by reference is deprecated in ......www/includes/joomla.php on line 841 and the font is a little different

the PHP version is 5.3.5

thx
Tom

i found:

Add in index.php in order to delete deprecated messages:
error_reporting( E_ALL & ~E_NOTICE & ~E_DEPRECATED );

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Sun Mar 06, 2011 1:59 am
by xdrone
Thanks for the fix....

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Wed Mar 09, 2011 7:08 pm
by ortolanne
Thank you kjellhahlen!
That fix saved my ass!

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Sun Mar 13, 2011 9:06 pm
by lulu108
kjellhahlen thanks so much, you'r a great man...

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Wed Mar 23, 2011 1:22 am
by Rolandmo
The provided .zip file worked like charm for me. Thank you a lot for your effort!

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Wed Mar 23, 2011 2:55 pm
by johnswallacejr
BEST FIX EVER!
My hosting company did an upgrade and this was the fix!

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Wed Mar 30, 2011 8:20 pm
by dweeziltje
Ik also worked for my old Mambo site

thank a million !!!

you made me very happy

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Thu Apr 21, 2011 4:31 am
by tomtim
kjellhahlen wrote:
fix_joomla_10x_php_530.zip
I wrote a fix. My version is Joomla 1.0.13 but I suppose it will not be very different for later versions.

You sould replace two files by the ones in the attachment:

/includes/Cache/Lite/Function.php
(this solves the "Reference instead of value"-problem)
/includes/vcard.class.php
(to make the contact form work again)

If you rather add the changes by hand:
The changes to vcard.class.php are minor, look for:

Code: Select all

if(!function_exists('quoted_printable_encode'))
In Function.php I added a this line twice:

Code: Select all

$arguments = $this->fixCalls($arguments);
The new function (fixCalls) is added at the end of the file.

Thx man, you save my site...

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Fri Jun 03, 2011 7:16 am
by dilasso
kjellhahlen wrote:
fix_joomla_10x_php_530.zip
I wrote a fix. My version is Joomla 1.0.13 but I suppose it will not be very different for later versions.
thanx a lot. it worked fine.

saved me a lot of time!

dilasso

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Fri Jun 10, 2011 5:35 pm
by cotros
worked like a charm!

well done mate, you are a life saver

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Mon Jul 11, 2011 2:17 pm
by windie809
i know this is a really old thread, but i needed to say thank you so much for providing the fix! :D i inherited a website that uses Joomla and have very little knowledge of this software! But your solution fixed my problem! :) thank you, thank you!!

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Sun Aug 21, 2011 12:56 pm
by initsoul
Also check this.
Found useful for fixing old rt_moomenu issue.

http://devthought.com/2009/06/09/fix-er ... in-php-53/

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Sat Aug 27, 2011 1:47 pm
by sweetemerald
Hi!
I have this error in my page:
Warning: Parameter 2 to chrome_box() expected to be a reference, value given in helpers/joomla.php on line 128
The code in this page is:

Code: Select all

<?php     

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

// ------------------------------------------------------------------------

/**
 * themeMagic Joomla! Helpers. These Functions interact and work with Joomla! Stuff.
 *
 *
 * @package		themeMagic
 * @subpackage	Helpers
 * @version		1.0 Beta. 
 * @author		Ken Erickson AKA Bookworm http://www.bookwormproductions.net
 * @copyright 	Copyright 2009 - 2010 DesignBreakDown
 * @license		http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2       
 * please visit the themeMagic site http://www.theme-magic.com  for support. 
 * Do not e-mail (or god forbid IM or call) me directly.
 *
 */

// ------------------------------------------------------------------------          
 
/**
 * Loads Modules From a Position
 *
 * @param string $moduleName Module Position to load modules from.
 * @param string $chrome The Chrome Function to Use. This is just a default and is over-ridden by suffix classes cfunc_chromeName
 * @param string $classCallBack This is userFunction called every time a module is loaded. 
 * The Class Returned is added to the module suffixes. Commonly used for even odd classes.
 * @param bool $inner add Inner Div Modules
 * @param string $innerClass Rhe class of the inner div      
 *
 * @return void       
 *
 **/
if(!function_exists('loadModule'))
{
	function loadModule($moduleName, $chrome = null, $class = null, $classCallback = null, $inner = true, $innerClass = 'modules', $modulesCSS = null, $moduleCSS = null, $raw = false)
	{   
		$magic =& get_instance();   
	    if(!module($moduleName)) return;
		$modules = magicModHelper::getModules($moduleName);
		
		$modulesCSS = "style=\"$modulesCSS\"";

	    if($raw == false) echo "<div id=\"$moduleName\" class=\"$class\" $modulesCSS >"; 
		if(!$inner == false) echo "<div class=\"$innerClass\">"  ; 
		if(!$chrome == null) $chrome = 'chrome_' . $chrome;   
		
		
		if($magic->admin->getCoreConfig('moduleTools') == 'true' AND isAdmin())  
		{
			echo '<div class="mod-details">';   
			ob_start(); 
			?>
			<div class="mod-details-position">[<?php echo $moduleName; ?>]</div>  
			<?php
			echo ob_get_clean();
		}	  
		  
		foreach($modules as $module)   
		{   
			$params = new JParameter($module->params);  
			$moduleClass = $params->get('moduleclass_sfx');

			if(!$classCallback == null)
			{   $previousID = $module->id - 1; 
				$currentID = $module->id;     
				$nextID = $module->id + 1;      
				$classCallbackArgs = array($currentID, $previousID, $nextID);
			    $moduleClass .= ' ' . call_user_func_array($classCallback, $classCallbackArgs); 
			}  

			if($module->content == null)  
			{
				$module->content = magicModHelper::renderModule($module); 
			}  
			
			$moduleClass = ' ' . $moduleClass;   
                    
			$callBackCheck = strrpos($moduleClass, "cfunc_");      
			if(!$callBackCheck == null)
			{    
				$chromeCallBackFunc = explode("cfunc_", $moduleClass);    
				$chromeCallBackFunc = explode(" ", $chromeCallBackFunc['1']); 
				$moduleClass = str_replace('cfunc_', ' ', $moduleClass);  
			}

			else 
			{
				$chromeCallBackFunc = null; 
			}      

			$chromeArgs = array($module, $params, $moduleClass, $moduleCSS);    

			if(!$chromeCallBackFunc == null) 
			{   
				$classFunc = 'chrome_' . $chromeCallBackFunc['0'];   
								   
	   			if(function_exists($classFunc))
				{   
					if($magic->admin->getCoreConfig('moduleTools') == 'true' and isAdmin())
					{
						echo $magic->joomla->moduleDetails($classFunc, $module, $params, $moduleClass, $moduleCSS);   
					}
					echo call_user_func_array($classFunc, $chromeArgs);   
				} 
				else 
				{  
		  			if($magic->admin->getCoreConfig('moduleTools') == 'true' and isAdmin())
					{
						echo $magic->joomla->moduleDetails($chrome, $module, $params, $moduleClass, $moduleCSS);   
					}     
				    echo $magic->joomla->moduleDefaultRender($module, $params, $moduleClass, $moduleCSS);
				} 
			} 

			else 
			{   
				if(!$chrome == null)
				{  
					if($magic->admin->getCoreConfig('moduleTools') == 'true' and isAdmin())
					{
						echo $magic->joomla->moduleDetails($chrome, $module, $params, $moduleClass, $moduleCSS);   
					}      
				    echo call_user_func_array($chrome, $chromeArgs);
				}   

				else
				{   
					if($magic->admin->getCoreConfig('moduleTools') == 'true' and isAdmin())
					{
						echo $magic->joomla->moduleDetails($chrome, $module, $params, $moduleClass, $moduleCSS);   
					}
					echo $magic->joomla->moduleDefaultRender($module, $params, $moduleClass, $moduleCSS);   
				}
			}

		}    


	    if($raw == false) echo "</div>";
		if(!$inner == false)  echo "</div>";  
		if($magic->admin->getCoreConfig('moduleTools') == 'true' and isAdmin())  
		{
			echo '</div>';  
		}    
	}  
}

// ------------------------------------------------------------------------       

/**
 * Checks if a module is published
 *
 * @return bool
 * 
 **/    
if(!function_exists('module'))
{
	function module($published)
	{  	
		$magic =& get_instance(); 
	    return $magic->template->countModules($published);       
	}  
} 

// ------------------------------------------------------------------------    
  
/**
 * Checks if any from array of modules is published
 *  
 * @param array $modules an array of modules. 
 * 
 * @return bool
 * 
 **/   
if(!function_exists('modules')) 
{
	function modules($modules) 
	{  
		if(is_array($modules))  
		{   
			foreach($modules as $key => $value) 
			{  
			   $publishCheck = module($modules[$key]['module']);
		       if($publishCheck == true) return true;
			}
			
			return false;  
		} 
	}  
}

// ------------------------------------------------------------------------    

/**
 * Removes Unpublished Modules from an array of modules. 
 * 
 * @param array $modules an array of modules. 
 * @return array
 * 
 **/  
if(!function_exists('cleanDisabledMods'))
{
	function cleanDisabledMods($modules)
	{   
		//Remove Any Unpublished Modules From Array 
	    if(is_array($modules))  {   
			foreach($modules as $key => $value) {  
			   $publishCheck = module($modules[$key]['module']);
			   if(!module($modules[$key]['module'])) {
					unset($modules[$key]);  
			   } 
			}  
		} 

		return $modules;
	}   
}  



// ------------------------------------------------------------------------    

/**
 * Loads a group of modules
 * 
 * @param array $modules a list of modules. Properties available module name, chrome, width, class and css    
 * @param int $parentWidth width of the parent item. 
 *   
 * @return void
 * 
 **/ 
if(!function_exists('loadModuleSet'))   
{
	function loadModuleSet($modules, $parentWidth, $inner = true, $loadModulesFunc = null, $raw = false, $sepWidth = null, $wrap = true, $wrapClass = null)
	{   
		
		if(count($modules) ==  1) { $sepWidth = null; }
		
	    if(is_array($modules))
		{  	
		   	// Setup the Modules array    
			$modules = cleanDisabledMods($modules);  
		    $modules = widthCalc($modules, $parentWidth, $sepWidth); 
		    $modules = cssSetter($modules, ' last-module-column', ' module-column');  
		   
	        if($wrap == true) echo "<div class=\"module-set $wrapClass\">"; 
			foreach($modules as $module) {   
	             if(isset($module['callFunc']))  
				 {  
					$loadModulesFunc = $module['callFunc']; 
					$modArgs = array($module, $inner);
					call_user_func($loadModulesFunc, $modArgs);        
			     } else {
						echo loadModule($module['module'], $module['chrome'], $module['class'], null, $inner, 'modules', $module['css'], null, $raw);  
	             }
			}    
			
			if($wrap == true) echo '</div>'; 
	        

		} else {
			return "Please Send a Modules array and parent width";
		}     

	} 
}
 
// ------------------------------------------------------------------------
    
/**
 * Loads the Component
 *
 * @return void      
 *
 **/   
if(!function_exists('component'))
{
	function component()
	{   
		$magic =& get_instance();

		ob_start();
		?>
			<div id="component-<?php echo $magic->joomla->currentComponent;?>">
				<jdoc:include type="component" />
			</div>   
		<?php
	    return ob_get_clean();
	}   
} 
  
// ------------------------------------------------------------------------
    
/**
 * Loads a Component OverRide;
 * 
 * @param obj    &$obj Reference to the $this obj.
 * @param string $themeName The name of the theme to get the over-ride from
 * @param string  
 * @return void   
 * 
 **/ 
if(!function_exists('loadComponentOverRide'))
{
	function loadComponentOverRide($themeName = null) 
	{
		$magic =& get_instance();   
		
		/* 
		 * We use backtrace to get the location that function is called on and to pass in the view object $this.
		 * I feel fearful using something named debug in production code so hopefully this has no issues 
		 * or security consequences.      
		 * 
		 **/
	    $trace = debug_backtrace(); 
	
		// Reference The Obj So We can pass it into files   
		$obj =& $trace[2]['object'];       
		
        
        // Get the Component Name 
        $componentName  = $trace[0]['file'];  
		$componentName = preg_match('/(?=)com_[\w]*/i', $componentName, $matches);
        $componentName = str_replace('.php', '', $matches[0]);   
        
        // Clean Path
        $cleanPath = BASEPATH . DS . 'html' . DS . $componentName; 
        $cleanPath = str_replace($cleanPath, '', $trace[0]['file']); 
        
        // Get the Components Theme   
        ${configThemeVar} = $componentName . 'Theme';   
        $configTheme = $magic->tconfig->{$configThemeVar};
	   
	    // Setup the Theme Name
        if(empty($configTheme)) 
		{
			if($themeName == null) 
			{
				if(empty($magic->tconfig->themeName)) 
				{
					$themeName = 'default';
				}   else { $themeName = $magic->tconfig->themeName; } 
			}
		}     
		
		else 
		{
			$themeName = $configTheme;
		}
        
	    $overRidePath = BASEPATH . DS . 'child_themes' . DS . $themeName . DS . 'components' . DS . $componentName .  $cleanPath;
	    include($overRidePath);
	}
} 

// ------------------------------------------------------------------------
    
/**
 * Loads a Template File.
 *
 * @param string $template The Name of The Template.
 * @param obj    &$obj Reference to the $this obj.  
 * @return void  
 *
 **/ 
if(!function_exists('loadTemplate'))
{
	function loadTemplate($template) 
	{   
		$magic =& get_instance();  
		   
		/* 
		 * We use backtrace to get the location that function is called on and to pass in the view object $this.
		 * I feel fearful using something named debug in production code so hopefully this has no issues 
		 * or security consequences.      
		 * 
		 **/
		$trace = debug_backtrace();
	    $path = dirname($trace[0]['file']);        
	    $obj =& $trace[4]['object'];  
	    $filePath = $path . '/'  . $template . '.php';
	
		ob_start();
	    include($filePath);
		$output = ob_get_contents();
		ob_end_clean();

		return $output; 
	}
}

// ------------------------------------------------------------------------
    
/**
 * Checks To See If a User is an Administrator
 *  
 * @return bool       
 *
 **/ 
if(!function_exists('isAdmin')) 
{
	function isAdmin()
	{
		$user =& JFactory::getUser();

		if($user->usertype == "Super Administrator") {
			return true;
		}
		else {
			return false;
		}  
	}
}    
  
// ------------------------------------------------------------------------
    
/**
 * Checks To See If Its the Homepage
 *  
 * @return bool 
 *
 **/ 
if(!function_exists('isHome')) 
{
	function isHome()
	{
		$menu = & JSite::getMenu();  

		if($menu->getActive() == $menu->getDefault()){
			return true;
		} else { return false; }
	}
}

// ------------------------------------------------------------------------
    
/**
 * Checks If a User is Logged In
 *  
 * @return bool 
 *
 **/ 
if(!function_exists('loggedIn')) 
{
	function loggedIn()
	{
		$user =& JFactory::getUser();

		if($user->id){
			return true;
		} else { return false; }
	}
}

I appreciate your help!
Tnks!

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Mon Aug 29, 2011 1:24 am
by xlw064
Wow I am speechless. Thanks, thanks and thanks. They fixed two of my problems at XAMPP with Joomla! 1.0.15. God bless you.

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Thu Sep 01, 2011 9:10 am
by mediabharti
Wonderful...! we just uploaded the function.php file and everything was on track... Thanks... :)

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Mon Sep 12, 2011 8:31 am
by sid1976
kjellhahlen wrote:
fix_joomla_10x_php_530.zip
I wrote a fix. My version is Joomla 1.0.13 but I suppose it will not be very different for later versions.

You sould replace two files by the ones in the attachment:

/includes/Cache/Lite/Function.php
(this solves the "Reference instead of value"-problem)
/includes/vcard.class.php
(to make the contact form work again)

If you rather add the changes by hand:
The changes to vcard.class.php are minor, look for:

Code: Select all

if(!function_exists('quoted_printable_encode'))
In Function.php I added a this line twice:

Code: Select all

$arguments = $this->fixCalls($arguments);
The new function (fixCalls) is added at the end of the file.

Thank you very much, it works for me:

RELEASE = '1.0'
DEV_LEVEL = '12'
BUILD = '$Revision: 6086 $'
RELDATE = '25 December 2006';

Re: Warning: Parameter 2 to frontpage() expected to be a ref

Posted: Wed Sep 14, 2011 10:27 am
by uk9790
thanks a TON GOKAN. You Rock....