Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
ArticleStatus.jpg | 41.6 KB | oneblankspace |
Comments
Comment #1
oneblankspace CreditAttribution: oneblankspace commentedI tried disabling Statuses micropublisher and could add an image in an Article.
Then I enabled Micropublisher again and the same error occurred.
Comment #2
mikeprinsloo CreditAttribution: mikeprinsloo commentedI'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.
Comment #3
oneblankspace CreditAttribution: oneblankspace commentedSince 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.
Comment #4
etsebeth CreditAttribution: etsebeth commentedHi,
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!
Comment #5
oneblankspace CreditAttribution: oneblankspace commentedIn 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:
Comment #6
etsebeth CreditAttribution: etsebeth commentedHi all,
Is it just me or is anybody else having issues with adding images to statuses?
Comment #7
oneblankspace CreditAttribution: oneblankspace commentedI have disabled statuses and am no longer seeing this error.
Comment #8
thirdender CreditAttribution: thirdender commentedIn 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 deprecatedfile_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?Comment #9
REPlummer CreditAttribution: REPlummer commentedI 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).
Comment #10
jbrundle CreditAttribution: jbrundle commentedI 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.