Hi,

I am unable to get flag submodules to work with statuses. After I enable the flag and flag for comments submodules for statuses, the following error is displayed.

•Strict warning: Declaration of fbss_flag::replace_tokens() should be compatible with that of flag_flag::replace_tokens() in require_once() (line 20 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_flag\fbss_flag.flag.inc).
•Notice: Undefined variable: flag in fbss_flag_views_default_views() (line 22 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_flag\views\fbss_flag.views_default.inc).
•Notice: Trying to get property of non-object in fbss_flag_views_default_views() (line 22 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_flag\views\fbss_flag.views_default.inc).
•Notice: Trying to get property of non-object in fbss_flag_views_default_views() (line 285 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_flag\views\fbss_flag.views_default.inc).
•Strict warning: Declaration of fbss_flag::replace_tokens() should be compatible with that of flag_flag::replace_tokens() in require_once() (line 20 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_flag\fbss_flag.flag.inc).

Please advise on any thoughts or next steps I can take.

Thanks

Comments

mathankumarc’s picture

Status: Active » Closed (duplicate)

Duplicate of #1296238: calls to flag_get_flag('follow')->fid or ->status fail

You need to use the latest dev version for flag integration.

Can we create another checkpoint release?

icecreamyou’s picture

This has already been fixed in dev.

EDIT: cross-post. Since we're so close to an alpha release no need to create another checkpoint release.

Also if an issue is closed before I comment on it I probably won't notice it so if you need my feedback just drop me an email or something.

oystercrackher’s picture

I'm relatively new to Drupal. Can you tell me what the best procedure is to replace the recommended release of this module with the dev version? If I do an uninstall and then try installing the dev version; it tells me that the module is already installed. Then when I try to enable it; it is still the old recommended release. Please advise.

Thanks

icecreamyou’s picture

  1. Go to admin/modules
  2. Un-check the box next to the modules you want to uninstall and submit the form
  3. Go to admin/modules/uninstall
  4. Check the box next to the modules you want to uninstall and submit the form
  5. Delete the module from your modules directory
  6. Download the dev version of the module and upload it to your modules directory
  7. Enable the modules you want

Generally you can skip the install/uninstall steps and just delete the old version and upload the new version. If you do that make sure to run update.php afterwards. Make sure you actually do delete the whole module folder though, if you just overwrite it you could end up with problems.

oystercrackher’s picture

Thank you @IceCreamYou for the instructions to install new dev version.

I have installed dev version and when enabling flag submodule for statuses, I now receive the following error:

•Notice: Undefined property: flag_heartbeat_message::$status in fbss_flag_views_default_views_alter() (line 68 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_flag\fbss_flag.module).
•Strict warning: Declaration of fbss_flag::replace_tokens() should be compatible with that of flag_flag::replace_tokens() in require_once() (line 20 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_flag\fbss_flag.flag.inc).

Any advice is greatly appreciated.

Thanks

mathankumarc’s picture

Strict warning: Declaration of fbss_flag::replace_tokens() should be compatible with that of flag_flag::replace_tokens() in require_once() (line 20 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_flag\fbss_flag.flag.inc).

yeah replace_tokens is changed in flag api 2. I think we need to revisit the flag integration again.

Can we reopen #1296238: calls to flag_get_flag('follow')->fid or ->status fail or use this issue to fix the flag integration.

Notice: Undefined property: flag_heartbeat_message::$status in fbss_flag_views_default_views_alter() (line 68 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_flag\fbss_flag.module).

I'm not able to reproduce this one

icecreamyou’s picture

Can we reopen #1296238: calls to flag_get_flag('follow')->fid or ->status fail or use this issue to fix the flag integration.

This issue is fine

mathankumarc’s picture

Status: Closed (duplicate) » Needs work

I dunno whether these functions are deprecated, I'm not seeing this flag_flag class

  • applies_to_content_id_array()
  • rules_get_event_arguments_definition()
  • rules_get_element_argument_definition()
mathankumarc’s picture

oops missed the patch.

icecreamyou’s picture

Well I haven't tested it but #10 doesn't introduce any breaking changes so if that fixes things that's fine

mathankumarc’s picture

I didnt tested this one. just modified the function definitions according to new api changes. If someone confirm this then its RTBC.

mathankumarc’s picture

I didnt tested this one. just modified the function definitions according to new api changes. If someone confirm this then its RTBC.

Edit : Duplicate comments :(

oystercrackher’s picture

Hi,

Thank you, the patch worked and allowed me to enable the statuses flag submodule without error, but when users login, they get the following error: (This error goes away if I disable the statuses flag submodule)

• Notice: Undefined index: join field in flag_handler_field_ops->query() (line 78 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\flag\includes\flag_handler_field_ops.inc).
• Notice: Undefined index: join field in flag_handler_field_ops->query() (line 104 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\flag\includes\flag_handler_field_ops.inc).

Additionally, when enabling the statuses flag comments submodule integration module, I receive the following error:

•Strict warning: Only variables should be passed by reference in statuses_views_handler_argument_flagged_user->option_definition() (line 15 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_flag\views\statuses_views_handler_argument_flagged_user.inc).
•Strict warning: Only variables should be passed by reference in statuses_views_handler_argument_flagged_user->option_definition() (line 15 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_flag\views\statuses_views_handler_argument_flagged_user.inc).
•Strict warning: Declaration of fbss_comments_flag::replace_tokens() should be compatible with that of flag_flag::replace_tokens() in require_once() (line 20 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_comments\fbss_comments_flag\fbss_comments_flag.flag.inc).

When disabling the flag comments submodule, get one additional error to those supplied above, this one is bolded below.

•Strict warning: Declaration of fbss_comments_flag::replace_tokens() should be compatible with that of flag_flag::replace_tokens() in require_once() (line 20 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_comments\fbss_comments_flag\fbss_comments_flag.flag.inc).
Strict warning: Declaration of statuses_views_handler_argument_flagged_user::query() should be compatible with that of views_handler_argument::query() in require_once() (line 11 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_flag\views\statuses_views_handler_argument_flagged_user.inc).
•Strict warning: Only variables should be passed by reference in statuses_views_handler_argument_flagged_user->option_definition() (line 15 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_flag\views\statuses_views_handler_argument_flagged_user.inc).
•Strict warning: Only variables should be passed by reference in statuses_views_handler_argument_flagged_user->option_definition() (line 15 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_flag\views\statuses_views_handler_argument_flagged_user.inc).

Thanks

mathankumarc’s picture

@oystercrackher
Thanks for your report.

seems to be flag integration needs more care. Will fix this in this weekend :)

deanflory’s picture

I too am getting this error when enabling the Statuses Flags module (error shown on Modules page):

Notice: Undefined property: flag_heartbeat_message::$status in fbss_flag_views_default_views_alter() (line 68 of /home/account/public_html/drupal/sites/all/modules/statuses/submodules/fbss_flag/fbss_flag.module).

oystercrackher’s picture

@mathankumarc

Do you have an eta on this fix?

Please advise.

Thanks

mathankumarc’s picture

Since I've other priorities I cant specify a eta for this one. But this will be fixed before alpha 1 release as Isaac mentioned in #1551542: [META] Release Plan

oystercrackher’s picture

Thank you for the update.

mathankumarc’s picture

Status: Needs work » Needs review
StatusFileSize
new3.04 KB
Strict warning: Only variables should be passed by reference in statuses_views_handler_argument_flagged_user->option_definition() (line 15 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_flag\views\statuses_views_handler_argument_flagged_user.inc).
•Strict warning: Only variables should be passed by reference in statuses_views_handler_argument_flagged_user->option_definition() (line 15 of C:\_BACKUPS\DrupalCore7.12\drupal-7.12\sites\all\modules\statuses\submodules\fbss_flag\views\statuses_views_handler_argument_flagged_user.inc).

I'm not getting this error. I fixed other issues.

hiddenfellon’s picture

Version: 7.x-1.0-unstable4 » 7.x-1.x-dev

I know some of these have been posted and probably wont help after the updated dev is done but here is what I am currently getting with the latest dev version and

Strict warning: Declaration of fbss_comments_flag::replace_tokens() should be compatible with that of flag_flag::replace_tokens() in module_load_include() (line 302 of C:\xampp\htdocs\d7\includes\module.inc).

Strict warning: Declaration of fbss_flag::replace_tokens() should be compatible with that of flag_flag::replace_tokens() in module_load_include() (line 302 of C:\xampp\htdocs\d7\includes\module.inc).

Strict warning: Declaration of fbsmp_views_handler_field_themed_attachment::init() should be compatible with that of views_handler_field::init() in _registry_check_code() (line 3046 of C:\xampp\htdocs\d7\includes\bootstrap.inc).

Strict warning: Declaration of statuses_views_handler_argument_flagged_user::query() should be compatible with that of views_handler_argument::query() in _registry_check_code() (line 3046 of C:\xampp\htdocs\d7\includes\bootstrap.inc).

Strict warning: Only variables should be passed by reference in statuses_views_handler_argument_flagged_user->option_definition() (line 15 of C:\xampp\htdocs\d7\sites\all\modules\statuses\submodules\fbss_flag\views\statuses_views_handler_argument_flagged_user.inc).

Strict warning: Only variables should be passed by reference in statuses_views_handler_argument_flagged_user->option_definition() (line 15 of C:\xampp\htdocs\d7\sites\all\modules\statuses\submodules\fbss_flag\views\statuses_views_handler_argument_flagged_user.inc).

Strict warning: Only variables should be passed by reference in statuses_views_handler_argument_flagged_user->option_definition() (line 15 of C:\xampp\htdocs\d7\sites\all\modules\statuses\submodules\fbss_flag\views\statuses_views_handler_argument_flagged_user.inc).

Strict warning: Only variables should be passed by reference in statuses_views_handler_argument_flagged_user->option_definition() (line 15 of C:\xampp\htdocs\d7\sites\all\modules\statuses\submodules\fbss_flag\views\statuses_views_handler_argument_flagged_user.inc).

Strict warning: Only variables should be passed by reference in statuses_views_handler_argument_flagged_user->option_definition() (line 15 of C:\xampp\htdocs\d7\sites\all\modules\statuses\submodules\fbss_flag\views\statuses_views_handler_argument_flagged_user.inc).

Strict warning: Only variables should be passed by reference in statuses_views_handler_argument_flagged_user->option_definition() (line 15 of C:\xampp\htdocs\d7\sites\all\modules\statuses\submodules\fbss_flag\views\statuses_views_handler_argument_flagged_user.inc).

Strict warning: Declaration of fbss_comments_flag::replace_tokens() should be compatible with that of flag_flag::replace_tokens() in module_load_include() (line 302 of C:\xampp\htdocs\d7\includes\module.inc).

Strict warning: Declaration of fbss_flag::replace_tokens() should be compatible with that of flag_flag::replace_tokens() in module_load_include() (line 302 of C:\xampp\htdocs\d7\includes\module.inc).


Strict warning: Declaration of fbss_comments_flag::replace_tokens() should be compatible with that of flag_flag::replace_tokens() in module_load_include() (line 302 of C:\xampp\htdocs\d7\includes\module.inc).

Strict warning: Declaration of fbss_flag::replace_tokens() should be compatible with that of flag_flag::replace_tokens() in module_load_include() (line 302 of C:\xampp\htdocs\d7\includes\module.inc).

//I dont think this one has been posted yet.
Notice: Undefined property: flag_broken::$status in fbss_flag_views_default_views_alter() (line 68 of C:\xampp\htdocs\d7\sites\all\modules\statuses\submodules\fbss_flag\fbss_flag.module).

Strict warning: Declaration of fbsmp_views_handler_field_themed_attachment::init() should be compatible with that of views_handler_field::init() in _registry_check_code() (line 3024 of C:\xampp\htdocs\d7\includes\bootstrap.inc).

And then I get these additional errors when posting a image using FBSMP.

Strict warning: Declaration of fbss_comments_flag::replace_tokens() should be compatible with that of flag_flag::replace_tokens() in module_load_include() (line 302 of C:\xampp\htdocs\d7\includes\module.inc).

Strict warning: Declaration of fbss_flag::replace_tokens() should be compatible with that of flag_flag::replace_tokens() in module_load_include() (line 302 of C:\xampp\htdocs\d7\includes\module.inc).

Im using the latest dev version of Statuses, flags, views and ctools

mathankumarc’s picture

Status: Needs review » Needs work

oops. just now I noticed that I didnt enabled E_STRICT error reporting. thats why I'm unable to reproduce some errors.

Re #21 : These errors are already been reported

Strict warning: Declaration of fbsmp_views_handler_field_themed_attachment::init() should be compatible with that of views_handler_field::init() in _registry_check_code() (line 3024 of C:\xampp\htdocs\d7\includes\bootstrap.inc).

This is not related to this issue queue. this issue should be reported in FBSMP module issue queue. However committed a fix to dev for this issue in fbsmp 7.x branch.

Hereafter post the issues in proper issue queues.

mathankumarc’s picture

Status: Needs work » Needs review
StatusFileSize
new5.07 KB

Finally got it. Fixed all the errors and warnings.

Any testers?

+++ b/submodules/fbss_flag/views/statuses_views_handler_argument_flagged_user.incundefined
@@ -11,8 +11,9 @@
-    $content_type = 'statuses';
-    $flag = array_shift(flag_get_flags($content_type));
+    $content_type = 'user';
+    $flags = flag_get_flags($content_type);

But I have a question regarding this one. I think $content_type should be user not statuses, cause in options_form we are listing the user content type flags not statuses content_type flags.

If this is the case, then we need to backport this change.

hiddenfellon’s picture

I would like to try this but im currently having a problem with the patching the patch on the module...

mathankumarc’s picture

hiddenfellon’s picture

Works like a charm, remember to put the patch in the root statuses file before patching people. =)

icecreamyou’s picture

Status: Needs review » Needs work

Re #23: you're right, good catch. Other than that this is RTBC.

(Sorry I've been AFK, busy at work.)

mathankumarc’s picture

Status: Needs work » Patch (to be ported)
StatusFileSize
new1.76 KB

No problem.

Committed to 7.x
Here is the patch for 6.x

I'm getting another bunch of warnings in other submodule handlers after enabling E_STRICT warnings. Need consider them as followup issue.

#1501978: Create an upgrade path from Facebook-style Statuses (D6) this alone is pending for alpha release. I'm really afraid to take this one :( Any way will give a try :)

icecreamyou’s picture

I have some time this afternoon, will commit this to D6 and work on the upgrade issue.

icecreamyou’s picture

Status: Patch (to be ported) » Fixed

Committed to D6. Marking this fixed, but let's make sure to follow up with other E_STRICT warnings.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

oystercrackher’s picture

Status: Closed (fixed) » Active

@mathankumarc

In #14 above, was the error for "join field in flag_handler_field_ops" listed above part of the applied fixes as I am running the latest dev version and still am getting the following error on the user's profile when I enable the flag submodule for statuses:

Notice: Undefined index: join field in flag_handler_field_ops->query() (line 78 of C:\Melissa\Drupal\Installation\Versions\Drupal Core\drupal-7.x\sites\all\modules\flag\includes\flag_handler_field_ops.inc).
Notice: Undefined index: join field in flag_handler_field_ops->query() (line 104 of C:\Melissa\Drupal\Installation\Versions\Drupal Core\drupal-7.x\sites\all\modules\flag\includes\flag_handler_field_ops.inc).

Also, while flag submodule is enabled, statuses do not appear in user's profile. When I disable flag submodule, the error disappears and the statuses then reappear in users profile.

Please advise on your thoughts.

Thanks so much.

icecreamyou’s picture

Status: Active » Closed (fixed)

@oystercrackher: I can't reproduce the issue you're describing. Please open a separate support request and reference any related issues.

oystercrackher’s picture

Done as requested; it is #1689502.

Thanks