Jump to content
Sign in to follow this  
dreaming spires oxford

Warning: call_user_func(tep_reset_cache_data_seo_urls) [function.call-user-func]: First argument is expected to be a valid callback in

Recommended Posts

Please could someone help me rectify this error.

Warning: call_user_func(tep_reset_cache_data_seo_urls) [function.call-user-func]: First argument is expected to be a valid callback in /admin/includes/functions/general.php on line 1195

Also installed is Header Tag Controller. Is this the problem?

Many thanks for your help.


Best regards

 

Peter

Share this post


Link to post
Share on other sites
Please could someone help me rectify this error.

 

Also installed is Header Tag Controller. Is this the problem?

Many thanks for your help.

Yeah, what does it say at admin/includes/functions/general.php on line 1195


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

Leslie

Thanks for your reply.

Line 1195 says

I am relly struggling with this...I know it is probably to do with the integration of this file from both the Ultimate seo urls, and header tags controller contributions. If you have these two running sucsessfully could I copy your script. Would that help?

Thanks again


Best regards

 

Peter

Share this post


Link to post
Share on other sites
Leslie

Thanks for your reply.

Line 1195 says

 

Here is the full script for general.php if it is more helpfull.

I am relly struggling with this...I know it is probably to do with the integration of this file from both the Ultimate seo urls, and header tags controller contributions. If you have these two running sucsessfully could I copy your script. Would that help?

Thanks again

I use neither.

The line 1195 is as it is in the stock osc install.

Try searching your files for tep_reset_cache_data_seo_urls


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites
Leslie

Many thanks again.

Found the problem

I had not posted the correct edit in includes/functions/html_output.php/

Now working.

Best regards from England...sorry about the Rugby.

 

Hi Folks,

 

I'm having this problem when i go to the SEO - URLS menu in admin;

 

Warning: call_user_func(tep_reset_cache_data_seo_urls): First argument is expected to be a valid callback in W:\www\mugs\shop\admin\includes\functions\general.php on line 1224

 

Any idea's how to fix it?

 

I've checked the install and reinstalled but that didn't fix it.

 

Any help would be greatly appreciated

 

Cheers,

Dave.

Share this post


Link to post
Share on other sites

I am also getting that same error

 

Warning: call_user_func(tep_reset_cache_data_seo_urls) [function.call-user-func]: First argument is expected to be a valid callback in /xxxxxx/xxxxxx/xxxxxxx/xxxxxxxxxxxxxx/xxxxxxxxxxx/admin/includes/functions/general.php on line 1195

 

This was posted by Sowdy!

 

Found the problem

I had not posted the correct edit in includes/functions/html_output.php/

Now working.

 

Could it be possible for a little more info on this, please.

 

Thanks

 

blr044

Share this post


Link to post
Share on other sites
You need the 'tep_reset_cache_data_seo_urls' function in admin/includes/functions/general.php file.

 

can you give us more details?

 

 

what code to change and what files?

Share this post


Link to post
Share on other sites

Also having same problem. Have not installed extras as of yet. I did a fresh install. of RC1

 

Could use some help please

Share this post


Link to post
Share on other sites

Hi,

 

After struggling with this problem for a few days I finally dug out the solution (at least this worked for me). Simply add this code to the bottom of your general.php file in admin/includes/functions folder. Before the last ?> of course.

 

// Function to reset SEO URLs database cache entries

// Ultimate SEO URLs v2.1

function tep_reset_cache_data_seo_urls($action){

switch ($action){

case 'reset':

tep_db_query("DELETE FROM cache WHERE cache_name LIKE '%seo_urls%'");

tep_db_query("UPDATE configuration SET configuration_value='false' WHERE configuration_key='SEO_URLS_CACHE_RESET'");

break;

default:

break;

}

# The return value is used to set the value upon viewing

# It's NOT returining a false to indicate failure!!

return 'false';

}

 

All the Best

~R

Share this post


Link to post
Share on other sites

I had the same issue - call_user_func(tep_reset_cache_data_seo_urls) [function.call-user-func]: First argument is expected to be a valid callback - this was after installing ULTIMATE_Seo_Urls_5_r96_rc The contrib worked fine in all other respects.

 

I was using the drop_on_top files in which the function tep_reset_cache_data_seo_urls is placed at the end of admin/includes/functions/general.php

 

All I did to sort it was take the function tep_reset_cache_data_seo_urls further up the page, placing it before the function tep_call_function which, on my version of general.php was around line 1203.

 

If you're new to osC, it might help to see the code we're talking about. At line 1203, I now have tep_reset_cache_data_seo_urls followed by tep_call_function.

 

// ULTIMATE Seo Urls 5 by FWR Media  
// Reset the seo urls cache
// Jimmy - 23Aug10 - this function was previously at the end of the file and, in the admin, we were getting an error message:
// "call_user_func(tep_reset_cache_data_seo_urls) [function.call-user-func]: First argument is expected to be a valid callback..." etc.
// resolved by placing this before the function "tep_call_function"
function tep_reset_cache_data_seo_urls($action = false){
 if ( $action == 'reset' ){
   $usu5_path = DIR_FS_CATALOG . DIR_WS_MODULES . 'ultimate_seo_urls5' . DIRECTORY_SEPARATOR;
   switch( SEO_URLS_CACHE_SYSTEM ){
     case 'FileSystem': 
       $path_to_cache = realpath($usu5_path . 'cache') . DIRECTORY_SEPARATOR;
       $it = new DirectoryIterator($path_to_cache);
       while( $it->valid() ){
         if ( !$it->isDot() && is_readable($path_to_cache . $it->getFilename()) && (substr($it->getFilename(), -6) == '.cache') ){
           unlink($path_to_cache . $it->getFilename());
         }
         $it->next();
       }
       break;
     case 'Database':
       tep_db_query("TRUNCATE TABLE `usu_cache`");
       break;
     case 'Memcached':
       if ( class_exists('Memcache') ){
         include_once $usu5_path . 'interfaces' . DIRECTORY_SEPARATOR . 'Interface_Cache.php';
         include_once $usu5_path . 'classes' . DIRECTORY_SEPARATOR . 'Usu_Cache_Memcached.php';
         $mc = new Usu_Cache_Memcached('dummy');
         $mc->flushOut();
       }
       break;
   }
   tep_db_query("UPDATE " . TABLE_CONFIGURATION . " SET configuration_value='false' WHERE configuration_key='SEO_URLS_CACHE_RESET'");
 }       
}
// endof tep_reset_cache_data_seo_urls function ################################

 function tep_call_function($function, $parameter, $object = '') {
   if ($object == '') {
     return call_user_func($function, $parameter);
   } elseif (PHP_VERSION < 4) {
     return call_user_method($function, $object, $parameter);
   } else {
     return call_user_func(array($object, $function), $parameter);
   }
 }

Share this post


Link to post
Share on other sites

Hi,

 

After struggling with this problem for a few days I finally dug out the solution (at least this worked for me). Simply add this code to the bottom of your general.php file in admin/includes/functions folder. Before the last ?> of course.

 

// Function to reset SEO URLs database cache entries

// Ultimate SEO URLs v2.1

function tep_reset_cache_data_seo_urls($action){

switch ($action){

case 'reset':

tep_db_query("DELETE FROM cache WHERE cache_name LIKE '%seo_urls%'");

tep_db_query("UPDATE configuration SET configuration_value='false' WHERE configuration_key='SEO_URLS_CACHE_RESET'");

break;

default:

break;

}

# The return value is used to set the value upon viewing

# It's NOT returining a false to indicate failure!!

return 'false';

}

 

All the Best

~R

 

Yeah, that worked for me too......... Thanx Sir.............


A man is great by Deeds, not by Birth....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×