Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Guest

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.

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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.

Link to comment
Share on other sites

  • 4 weeks later...
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.

Link to comment
Share on other sites

  • 2 months later...

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

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
  • 3 weeks later...
  • 2 months later...

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

Link to comment
Share on other sites

  • 2 years later...

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);
   }
 }

Link to comment
Share on other sites

  • 2 years later...

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....

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...