Comments

icecreamyou’s picture

Ooh, I haven't looked into how Rules integration has changed in D7. Obviously one of the more important integrations.

Oudein’s picture

Subscribe. I have gotten exactly the same.

nikkubhai’s picture

Component: Code » Code (API)

subscribe . Lets see if I can help with this.

cutmedia’s picture

have similar error:
Fatal error: Class 'rules_data_type' not found in /home/test/public_html/sites/all/modules/statuses/submodules/fbss_rules/fbss_rules.rules.inc on line 374
Makes the site unusable.

msbrar’s picture

Same Error. Did anybody solve this.

pomgod’s picture

same eror

icecreamyou’s picture

Title: Error after loading module » Rules integration is broken

The obvious solution, for now, is to disable the fbss_rules submodule.

For (my) future reference, Rules 7.x-2.x documentation is at https://drupal.org/node/878720 and http://drupalcode.org/project/rules.git/blob/refs/heads/7.x-2.x:/rules.a...

damiankloip’s picture

StatusFileSize
new1.31 KB

The below patch fixes the fbss_rules_rules_event_info() hook. So it now doesn't throw errors when creating a rule etc... The statuses information is still not accessible to rules though. Hopefully there will be a patch for this soon too.

damiankloip’s picture

Status: Active » Needs review
icecreamyou’s picture

Status: Needs review » Active

Committed, thanks

henrijs.seso’s picture

Error still exists blocking possibility to install module.

damiankloip’s picture

This wasn't a fix for the whole problem. Hence the reason the issue is still open :)

ryanwesley’s picture

I went into the system database and disabled all of the Statuses Modules by replacing with 0..
unfortunately I still get the "fbss_comments/fbss_comments_rules/fbss_comments_rules.rules.inc on line 289"
how can I just get back to accessing my site???

bjalford’s picture

I deleted the class in question: class rules_data_type_statuses extends rules_data_type

and the module installs fine, and one a quick test it worked. I created a rule that updates heartbeat when a status is saved. Maybe that's a starting point and then go from there?

damiankloip’s picture

I think I could provide a patch to fix this. The rules integration needed a few changes.

bjalford’s picture

that would be great. Happy to help test.

SandeepPatel’s picture

Same!
if there is at all a patch available I'd be happy to give it a try!

IWasBornToWin’s picture

@ryanwesley go to your backend folders via ftp and delete the statuses folder from your /sites/all/modules folder. It should get your site back up immediately.

liliplanet’s picture

Priority: Major » Normal

It would be wonderful if the rules component be updated for 7.x please as then we would be able to integrate statuses with heartbeat :)

liliplanet’s picture

bjalford would you be so kind to show us where you deleted the class?

most appreciated :)

rogical’s picture

guys, if you want to know more on rules2, this is a good module for you - Rules examples

dzstoyanov’s picture

@Liliplanet

In case anyone was wondering where to find
class rules_data_type_statuses extends rules_data_type {

It's in statuses/submodules/fbss_rules/fbss_rules.rules.inc

liliplanet’s picture

Priority: Normal » Major

Thank you szstoyanov, have you perhaps got the rules to work when you delete the class?

Do you think this sub-module will eventually be integrated to D7? Such a important part of the wonderful Statuses module :)

rogical’s picture

Priority: Normal » Major

Recently, I'm trying to integrate my custom module with rules2, and find that it's a bit difficult when your data structure is not an entity.

Rules2 now has a good support with entities, see this Rules builds upon the data types as used by the Entity API

Not sure if this helps.

mathankumarc’s picture

Status: Active » Needs work
StatusFileSize
new1.54 KB

Here is the initial patch for rules integration, basic stuffs will work.
condition's will not work

icecreamyou’s picture

Committed #26 to dev, thanks. Can't be worse than what's already there. :-P

Style9’s picture

Thank you IceCreamYou for all your hard work. Just to let you know: The error message is still there (even with the latest dev) ".../fbss_comments_rules/fbss_comments_rules.rules.inc on line 289"

mathankumarc’s picture

oops, didnt looked into the fbss comments rules integration.
Will provide the patch ASAP.

pipep’s picture

update chrashed my dev site

Class 'rules_data_type' not found in .../.../.../fbss_rules/fbss_rules.rules.inc on line 385

mathankumarc’s picture

@pipep

You need to use the latest dev version of statuses, However still rules integration is not completely ready, So disabling the fbss_rules submodule is a good choice as of now.

pipep’s picture

@mathankumarc yep thxs, I had to do that while i'm trying to fix it...

in my opinion, this is first priority at the moment for statuses. while I'm trying to find a solution It might be helpful to others if we have the errors recorded so we keep going forward..

liliplanet’s picture

Actually I think we should consider the rules for Statuses as abandoned for D7 as this has been an issue since August 2011. Most unfortunate as it has been such a beautiful and useful module in D6.

mathankumarc’s picture

@liliplanet
its not abandoned. As Isaac mentioned in #1 this is an important integration, so we will bring it up.

icecreamyou’s picture

Yeah, 6 months of me not personally fixing this doesn't mean it's never going to happen. Other people can do it too even if I have other projects, and I'm definitely still around.

alexmc’s picture

So, I installed FBSMP and get a WSOD. No admin interface, and Drush is not running either. Is there a standard way I can disable just enough of FBSMP so that it still works..... without Rules? Is my only option to disable the module by changing the database? Or do I change the source with one of the suggestions above?

$ drush pm-list
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP Fatal error: Class 'rules_data_type' not found in /data250/BLAH_drupal/drupal-7.12/sites/all/modules/fbsmp/fbsmp.rules.inc on line 127
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Class 'rules_data_type' not found in
/data250/BLAH_drupal/drupal-7.12/sites/all/modules/fbsmp/fbsmp.rules.inc, line 127

$ drush pm-disable fbsmp
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP Fatal error: Class 'rules_data_type' not found in /data250/BLAH_drupal/drupal-7.12/sites/all/modules/fbsmp/fbsmp.rules.inc on line 127
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Class 'rules_data_type' not found in
/data250/BLAH_drupal/drupal-7.12/sites/all/modules/fbsmp/fbsmp.rules.inc, line 127

icecreamyou’s picture

There is a separate issue for FBSMP: #1388612: Rules integration is broken

pipep’s picture

I give up, there are too many bugs.

feels like it's best to look for alternatives at the moment, as without rules the module is useless at least for me.

rogical’s picture

I've successed in integrating my custom modules with rules, but there're a lot work.

At first, my data structure doesn't use entity, I just built tables and out blocks fields etc, everything goes fine.

Then I tried to integrate with rules, found it's very difficult when it's not entities.

Finally, I rebuilt my data structure with a drupalize way -- entity, and use entity api module.
Now, it works perfect with rules with little work.

In all, rules needs entity!

icecreamyou’s picture

There's a patch to make statuses into entities here although it doesn't yet add integration with the Entity API module which is required for automatic Rules integration. But for anyone looking to help with this, that might be a good place to start.

mitchell’s picture

Issue tags: +rules integration

tagging

mathankumarc’s picture

Attached the patch for the statuses rules conditions(Not for commit), I'm adding this patch to get the review from the community.

I have few questions

  1. Am I proceeding in the right way(Because for past few days I'm digging my head into rules and entity, however I'm not able to conclude anything).
  2. How to get the checkboxes for Recipient types
  3. How to restrict multiple values in select list(In rules condition argument types)

Other than "User has permission to send a status message" condition everything is working. For "User has permission to send a status message", currently recipient type accepts multiple values, However In D6 it was designed to accept only one values.

mathankumarc’s picture

StatusFileSize
new12.76 KB

Hurray! Finally got it working.

Here is the patch for complete rules integration for statuses(statuses core alone, submodules needs work). Definitely for commit.

Its really so simple to integrate with rules, Hats off to fago for such an awesome module. Without entity also, rules integration is possible :)

icecreamyou’s picture

Syntactically this looks fine. To answer your questions I will need some time to review the Rules API myself as I'm not familiar with the changes in D7 yet.

+++ b/submodules/fbss_rules/fbss_rules.rules.inc
@@ -115,9 +131,29 @@ function fbss_rules_is_self($status) {
+  $contexts = module_invoke_all('statuses_context_info');

Use statuses_all_contexts() instead of invoking the hook so that settings are loaded from the database and not just from code.

icecreamyou’s picture

Cross-post! But actually the feedback is the same: if you change that module_invoke_all() call to statuses_all_contexts() instead, you can go ahead and commit this. Worst case scenario, it still doesn't work. ;-)

mathankumarc’s picture

Committed fix to dev.

@all
After applying the above patch(or after pulling the latest dev), flush all the caches.

icecreamyou’s picture

Status: Needs work » Needs review

Great. I am not going to have time in the next few days but let's try to get someone else to verify that this works. Otherwise I will try to test it next week and if I don't get to it this can be marked fixed after 1 week.

mathankumarc’s picture

Here is the patch for statuses tags rules integration. I don't know why, these conditions are only working for @ mentions not for #(hashtags)

Changing the status to "needs work", since the following sub modules needs to be ported

  • fbss_privacy
  • fbss_comments
  • fbss_domains
mathankumarc’s picture

Status: Needs review » Needs work

oops, didn't changed the status!

mathankumarc’s picture

Here is the patch for fbss comments rules integration, its working perfectly.

Rules integration is so simple and awesome.

liliplanet’s picture

wow thank you mathankumarc for the moving forward to rules integration!

eidoscom’s picture

Many many thanks, you boost the project!! ;)

mathankumarc’s picture

Status: Needs work » Needs review
StatusFileSize
new2.84 KB

Here is the patch for fbss domain and privacy rules integration.

icecreamyou’s picture

#48, #50, and #53 all look good and can be committed.

mathankumarc’s picture

Committed all the patches to dev.

icecreamyou’s picture

Status: Needs review » Needs work

Just caught this: you spelled "recipient" as "reciptent" all over the place.

Also +function fbss_reciptent_types(){ there should be a space before the curly bracket and one less space after the "function" keyword.

mathankumarc’s picture

Status: Needs work » Needs review
icecreamyou’s picture

Status: Needs review » Needs work

Okay after testing fairly lightly I can confirm that it's working except:

  • As previously noted, the "has specific tag" condition is not working.
  • Tokens for the status aren't available as "Replacement patterns."

I committed a fix to dev for the first point (the order of parameters were reversed) but the second point needs more research.

mathankumarc’s picture

Can we move token integration to separate inc file, because that will be very easy to maintain.

Just now looked into tokens, it has changed lot in Drupal 7(most of the things moved into core.). Why cant we move this to separate issue?

icecreamyou’s picture

I was operating under the assumption that Token integration was working, but somehow it wasn't working correctly with Rules. If the problem is actually that Token integration is broken we should definitely move that into a separate issue. Since that seems to be the only remaining question in this thread, that means we can mark this issue fixed once a new issue for Token integration is opened.

EDIT: and yes, we can move token integration into a separate file if that is allowed -- I'm not sure it is since core wouldn't know to include that file before invoking the relevant hooks, but if there is a way to make core aware of that file without being redundant then yes we can do that.

mathankumarc’s picture

Status: Needs work » Needs review

Created a new issue for token integration #1531976: Token integration is broken

we can move it to new file and it can be included in hook_init(). This issue can be closed.

icecreamyou’s picture

Status: Needs review » Fixed

Great.

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