Closed (fixed)
Project:
Statuses (Social Microblog)
Version:
7.x-1.x-dev
Component:
Code (API)
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 Oct 2012 at 05:44 UTC
Updated:
21 Oct 2012 at 16:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
mathankumarc commentedDuplicate of #1710880: Fatal error: Cannot use object of type stdClass as array in ....
Comment #2
Triumphent commented@mathankumarc
The previous post has been closed unresolved. A new thread is required.
Comment #3
mathankumarc commented@Triumphent that's why I didn't closed the issue as duplicate :)
Comment #4
Triumphent commentedAdditional warning messages:
Warning: Cannot use a scalar value as an array in _statuses_links_sort() (line 140 of /home/example/public_html/sites/all/modules/statuses/includes/statuses.preprocess.inc).
Warning: Cannot use a scalar value as an array in _statuses_links_sort() (line 143 of /home/example/public_html/sites/all/modules/statuses/includes/statuses.preprocess.inc).
Warning: Cannot use a scalar value as an array in _statuses_links_sort() (line 143 of /home/example/public_html/sites/all/modules/statuses/includes/statuses.preprocess.inc).
Warning: Cannot use a scalar value as an array in _statuses_links_sort() (line 143 of /home/example/public_html/sites/all/modules/statuses/includes/statuses.preprocess.inc).
Warning: Cannot use a scalar value as an array in _statuses_links_sort() (line 143 of /home/example/public_html/sites/all/modules/statuses/includes/statuses.preprocess.inc).
Warning: Cannot use a scalar value as an array in _statuses_links_sort() (line 140 of /home/example/public_html/sites/all/modules/statuses/includes/statuses.preprocess.inc).
Comment #5
icecreamyou commentedAs noted in that other thread, this is very likely due to another module conflicting. Resolving this requires figuring out what that other module is. @Triumphent, please run this code on your site (e.g. via /devel/php or previewing a node with the PHP input filter) and copy-paste the result here:
That code should print out a list of the modules that implement hook_link(), which is what appears to be the conflict here.
Comment #6
Triumphent commentedHere it is IceCreamYou:
Array
(
[0] => webform
[1] => flag
[2] => i18n_translation
[3] => statuses
)
In this case, it's got to be i18n_translation, which I installed a couple of weeks ago. Webform and flag have been on my site almost since I started it and never caused any trouble while I was setting up Statuses.
Comment #7
Triumphent commentedThere. I got he same six warnings as above but with an additional notice:
Notice: Undefined property: stdClass::$native in i18n_translation_link() (line 545 of /home/example/public_html/sites/all/modules/i18n/i18n.module).
That's the Internationalization module. A basic module required to have a site in several languages.
Here are lines 539 to 555 (as rendered by Komodo;)
539 * Build translation link
540 */
541 function i18n_translation_link($path, $langcode, $link = array()) {
542 $language = i18n_language_object($langcode);
543 $link += array(
544 'href' => $path,
545 'title' => $language->native,
546 'language' => $language,
547 'i18n_translation' => TRUE,
548 );
549 $link['attributes']['class'] = array('language-link');
550 // @todo Fix languageicons weight, but until that
551 if (function_exists('languageicons_link_add')) {
552 languageicons_link_add($link);
553 }
554 return $link;
555 }
Comment #8
icecreamyou commentedAh, okay, thanks. Here is a patch that renames hook_link() to avoid this conflict. I haven't tested it but it's a pretty straightforward change (might require clearing the cache).
Comment #9
Triumphent commentedYes..! The patch is working great where I had the problem. It's fixed. Thank you. :)
Comment #10
icecreamyou commentedGreat. Committed to dev.
Comment #11
deanflory commentedHere's my results in case it helps as I've been receiving the same error since updating recently:
Notice: Undefined index: enabled in statuses_all_contexts() (line 805 of /home/account/public_html/drupal/sites/all/modules/statuses/statuses.module).
[0] => webform
[1] => notifications_ui
[2] => special_menu_items
[3] => statuses
[4] => read_more
Looks like statuses and webform are common denominators.
I'll try out the new dev version. Thanks!