Fatal error: Call to undefined function _fb_settings_url_rewrite_prefixes() in ..../modules/fb/fb.module on line 840

Just installed the latest from cvs and found this issue. I added a module_load_include() where needed and it fixed the error.

CommentFileSizeAuthor
include_settings_inc.patch688 bytesBlakeLucchesi

Comments

BlakeLucchesi’s picture

Status: Needs review » Closed (works as designed)

Hmm, I guess I was quick to jump the gun here (RTFM):

- Edit your settings.php file (sites/default/settings.php, depending
on your install) to include fb_settings.inc (in this directory).
For example, add this at the very end of your settings.php:

require_once "sites/all/modules/fb/fb_settings.inc";

(Or whatever path is appropriate, could be
"profiles/custom/modules/fb/fb_settings.inc")

See the end of this file for other configuration you may add to
settings.php.

Marked as "by design"

BlakeLucchesi’s picture

Status: Closed (works as designed) » Closed (fixed)
jasom’s picture

I almost created new issue, uf:)

I thing better idea is put more infomation about error which you get at the top of readme.txt:)

I get this:
Fatal error: Call to undefined function _fb_settings_url_rewrite_prefixes() in blabla\sites\all\modules\fbxx\fb.module on line 878

dkmarshall’s picture

I have the same error. Sorry if this is a dumb question but how or where do I apply the patch? Is it as easy as pasting the code at the end of the fb.module file?

bughouse’s picture

I have the same error and have tried changing the settings file. Do I also need to apply the patch? I changed the settings file to point to the api files I downloaded from facebook. Any help would be great I am unsure of what is creating this setup error. Thanks!

babbage’s picture

Priority: Normal » Critical
Status: Closed (fixed) » Active

How is this closed? This is a huge bug. Install this module via Drush and it cases a fatal error on your site. This module should not bring down an entire site just because a user activates the module before reading the installation guide.

babbage’s picture

Marked #736716: Fatal error: Call to undefined function as a duplicate of this issue.

Dave Cohen’s picture

Status: Active » Needs review

I'll include this patch in beta10...

Index: fb.module                                                                                                 
===================================================================
--- fb.module   (revision 2355)                                                                                  
+++ fb.module   (working copy)                                                                                   
@@ -106,12 +106,17 @@
   }                                                                                                             
                                                                                                                 
   // Perform sanity check, help users who skip the README.                                                      
-  if (!variable_get('fb_settings_check', FALSE) && user_access('access administration pages')) {                
-    drupal_set_message(t('!drupal_for_facebook has been enabled, but not properly installed.  Please read the !\
readme.',                                                                                                        
-                         array('!drupal_for_facebook' => l(t('Drupal for Facebook'), 'http://drupal.org/project\
/fb'),                                                                                                           
-                               // This link should work with clean URLs                                         
-                               // disabled.                                                                     
-                               '!readme' => '<a href='. base_path() . drupal_get_path('module', 'fb') .'/README\
.txt>README.txt</a>')), 'error');                                                                                
+  if (!variable_get('fb_settings_check', FALSE)) {                                                              
+    // Avoid errors caused by settings not included.                                                            
+    module_load_include('inc', 'fb', 'fb_settings');                                                            
+                                                                                                                
+    if (user_access('access administration pages')) {                                                           
+      drupal_set_message(t('!drupal_for_facebook has been enabled, but not properly installed.  Please read the\
 !readme.',                                                                                                      
+                           array('!drupal_for_facebook' => l(t('Drupal for Facebook'), 'http://drupal.org/proje\
ct/fb'),                                                                                                         
+                                 // This link should work with clean URLs                                       
+                                 // disabled.                                                                   
+                                 '!readme' => '<a href='. base_path() . drupal_get_path('module', 'fb') .'/READ\
ME.txt>README.txt</a>')), 'error');                                                                              
+    }                                                                                                           
   }                                                                                                             
                                                                                                                 
   // Ask other modules for app details.                                                                         

netrom’s picture

Did you include it in beta 10?

Because I stille get the error message (after installing the beta 10).