When trying to add an image to an article as an authenticated user, it works in preview; but when they go to save, they get this error:

Fatal error: Call to undefined function file_create_path() in /home/ghookerm/public_html/aimable/sites/all/modules/fbsmp/plugins/photo.inc on line 516

That same error appears in a popup box when they try to remove the image.

Should fbsmp even be called at all when creating an Article?

CommentFileSizeAuthor
ArticleStatus.jpg41.6 KBoneblankspace
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

oneblankspace’s picture

I tried disabling Statuses micropublisher and could add an image in an Article.

Then I enabled Micropublisher again and the same error occurred.

mikeprinsloo’s picture

I've recently started having this problem on a D7 site that has been running fbsmp for a while. The file_create_path() function was deprecated in Drupal 7. I'm not sure what the purpose of fbsmp_photo_file_download() is, but since It contains D6 code, while I've been running the D7 module for a while, I simply removed everything inside this function. Following a very cursory investigation, it seemed to solve the problem without breaking anything important. If there is a better solution, please let me know.

oneblankspace’s picture

Since it only happens to images uploaded directly into articles, and not to images uploaded using IMCE, I am turning off new articles as a workaround.

etsebeth’s picture

Hi,

Is this related to the issue I have?

Warning: Attempt to assign property of non-object in file_entity_file_load() (line 194 of /Users/etsebeth/Sites/devdesktop/openatrium-7.x-2.19-core/profiles/openatrium/modules/contrib/file_entity/file_entity.file.inc).

Thanks in advance!

oneblankspace’s picture

In a blog post, the user successfully linked to a youtube video (which did not embed) but the post showed a big red box at the top:

  • Warning: Missing argument 2 for fbsmp_photo_fbsmp_token_values(), called in /home/ghookerm/public_html/aimable/sites/all/modules/fbsmp/fbsmp.module on line 922 and defined in fbsmp_photo_fbsmp_token_values() (line 481 of /home/ghookerm/public_html/aimable/sites/all/modules/fbsmp/plugins/photo.inc).
  • Notice: Undefined variable: attachment in fbsmp_photo_fbsmp_token_values() (line 482 of /home/ghookerm/public_html/aimable/sites/all/modules/fbsmp/plugins/photo.inc).
  • Notice: Trying to get property of non-object in fbsmp_photo_fbsmp_token_values() (line 482 of /home/ghookerm/public_html/aimable/sites/all/modules/fbsmp/plugins/photo.inc).
etsebeth’s picture

Hi all,

Is it just me or is anybody else having issues with adding images to statuses?

oneblankspace’s picture

Status: Active » Closed (won't fix)

I have disabled statuses and am no longer seeing this error.

thirdender’s picture

In regards to OP, file_create_path was deprecated in Drupal 7, and this module implemented it's own custom _fbsmp_file_create_path function instead. There was one incorrect reference to the deprecated file_create_path function in the 7.x-1.0-unstable1 release of this module, and that's what's causing your error. Could you please try installing the 7.x-1.x-dev version of the module instead and help us test that?

REPlummer’s picture

I can't get photos/thumbnail images for links either, and this is the error that keeps showing in my logs:

Trying to get property of non-object in fbsmp_photo_file_download()

Jan 23 20:04:17 Buttercup armoire: web-URL|1422061457|php|24.116.160.93|http://web-URL/system/files/u84/book11coverfront.jpg|http://web-URL/|16237||Notice: Trying to get property of non-object in fbsmp_photo_file_download() (line 520 of /var/www/html/bcmain/armoire/sites/all/modules/fbsmp/plugins/photo.inc).
Jan 23 20:04:17 Buttercup armoire: http://web-URL|1422061457|php|24.116.160.93|http://web-URL/system/files/u84/book11coverfront.jpg|http://web-URL/|16237||Notice: Trying to get property of non-object in fbsmp_photo_file_download() (line 520 of /var/www/html/bcmain/armoire/sites/all/modules/fbsmp/plugins/photo.inc).

jbrundle’s picture

I am using Statuses and Micropublisher on an Open Atrium 7.x-2.26 site and it photos upload properly and display, albeit with warnings similar to the above. However, on an Open Atrium 7.x-2.30 site, photos upload but do not display in the statuses. Possibly the same reason? Links do attach and display properly, however.