We need to remove the discount inline conditions from the module. This module expose a new field type for Drupal, and should stay to this role. For the time being, we have included the discount inline conditions in the module, but those conditions have to move into the commerce_discount since only this module is using them.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jkuma’s picture

Issue summary: View changes
mglaman’s picture

Status: Active » Needs review
FileSize
32.56 KB

Here is the patch that removes Commerce Discount related inline conditions.

Related patch to Commerce Discount will be created next and linked back to here.

mglaman’s picture

Ralt’s picture

I've tested applying both #2244969 and #2129997 succesfully. Everything I've tested keeps working. Commits here (for inline_conditions) and here (for commerce_discount) if one wants to cherry-pick the commits.

Ralt’s picture

Status: Needs review » Reviewed & tested by the community
mglaman’s picture

Thanks Ralt!

Only request to maintainers - if you cherry-pick off of the GitHub fork, there isn't commit authorship :/ Not an end of the world thing, but one of those little things that makes it feel worth it.

  • nvahalik committed 5fbe2f4 on 7.x-1.x authored by mglaman
    Issue #2129997 by mglaman: Remove discount inline conditions
    
joelpittet’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/inline_conditions.module
@@ -801,3 +801,14 @@ function inline_conditions_get_info_by_module($module = NULL) {
+
+/**
+ * Options list callback for condition.
+ */
+function _inline_conditions_operator_options() {
+  return array(
+    '<' => t('lower than'),
+    '==' => t('equals'),
+    '>' => t('greater than'),
+  );
+}

This function isn't being used, did it sneak in by accident?

  • goldorak committed d2b0c4f on 7.x-1.x
    Issue #2129997 by mglaman, joelpittet: Remove useless...
jkuma’s picture

Status: Needs work » Fixed

Hello joel,

I've removed that old function, thanks for the catch!

joelpittet’s picture

No problem, @goldorak thanks for the commit.

Status: Fixed » Closed (fixed)

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

zmove’s picture

Priority: Normal » Major
Status: Closed (fixed) » Active
FileSize
6.45 KB

Have a problem when I try to update a rule with an operator :

call_user_func('_inline_conditions_operator_options', Object, 'operator') ui.data.inc:202
RulesDataUIText::inputForm('operator', Array, Array, Object) 
call_user_func(Array, 'operator', Array, Array, Object) ui.core.inc:316
RulesPluginUI->getParameterForm('operator', Array, Array, 'input') ui.core.inc:233
RulesPluginUI->form(Array, Array, Array) ui.core.inc:894
RulesAbstractPluginUI->form(Array, Array, Array) 
call_user_func_array(Array, Array) faces.inc:130
FacesExtendable->__call('form', Array) rules.core.inc:362
RulesExtendable->__call('form', Array) rules.core.inc:1260
RulesPlugin->form(Array, Array, Array) ui.forms.inc:373
rules_ui_edit_element(Array, Array, Object, Object, 'admin/config/workflow/rules/components') 
call_user_func_array('rules_ui_edit_element', Array) form.inc:841
drupal_retrieve_form('rules_ui_edit_element', Array) form.inc:350
drupal_build_form('rules_ui_edit_element', Array) form.inc:130
drupal_get_form('rules_ui_edit_element', Object, Object, 'admin/config/workflow/rules/components') 
call_user_func_array('drupal_get_form', Array) menu.inc:519
menu_execute_active_handler() index.php:21

And see the screenshot, the operator list is empty. Can be considered as major issue if, as it seems to be, it break all rules with operators.

joelpittet’s picture

Assigned: jkuma » Unassigned
Status: Active » Closed (fixed)

@zmove please open a new issue for that, and to get the most, provide steps to reproduce the issue.

zmove’s picture

joelpittet’s picture

Thank you zmove for cross posting the issue back here.