Closed (fixed)
Project:
Modal operations
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Feb 2014 at 16:29 UTC
Updated:
17 Mar 2015 at 16:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
maximpodorov commentedYes, the problem is the different versions of the Entityform module. Version 1 contains these functions, version 2 does not.
Comment #2
skaduHi there maximpodorov, love the module, this is exactly what I am looking for to use with entity forms. As with Anybody here, I am using the 2.x branch of entityforms and can not go back to the 1.x branch. As mentioned above, the access check section you have in your module does not use the new functions.
Entityforms removed it's requirement on rules, and that functionality was spun into it's own module, entity_rules. It has equivalent functions that execute rules but required some other changes.
Attached is a patch that will work with Entityforms 2 (mostly), it will correctly execute rules, however, I am still having another issue where the ajax response does not cause a page load when it is supposed to. I think there is an issue in the commands array being passed back through, but I will dig into that in a separate issue.
I wanted to provide you with the changes needed to get rules execution working with entityform 2. Attached is a patch that enables that.
The changes occur in two main places:
The modal_entityform_page_submit function
The modal_entityform_access function
This allows the access rules to fire off and should give you a headstart on getting this to work with the new version of entity forms.
I am however still have a problem on the submit side of things. The form calls the ajax submit URL, but does not cause the page to refresh, or really return anything from the ajax call. The submission occurs (I can see the submissions on the entity form submissions page, but nothing is returned from the ajax call. I am still working through that and will try to follow up with any findings.
Thanks again for your help, hope this is of use to you.
Comment #3
skaduJust a quick follow up to my note above, the submission error I am having is related to the clientside_validation module. Still investigating...
Comment #4
skaduSo my issue has something to do with the way the $command array is being passed on the form submit. I had to ensure it was empty during the second round of process. Otherwise, it has erroneous items in it due to the I believe the ctools_modal_form_wrapper being called. Apologies if I am way off, but by emptying out the command array prior to the additional redirects and modal_message commands being added on, I do not run into any issues.
Comment #5
anybodyThe patch above works great for my problem!
Comment #6
maximpodorov commentedThe code is committed to support both versions of Entityforms module. I close the issue now. Please reopen if the problem remains.
Comment #8
kopeboyInstalled the modules today and still doesn't work.
entityform 7.x-2.0-rc1
modal 7.x-1.x-dev
modal_entityform 7.x-1.x-dev
modal_forms 7.x-1.2
I created an EF with machine name "test_form"
I am building my link like this:
<a href="modal/entityform/test-form/nojs/0" class="ctools-use-modal ctools-modal-modal-popup-small">Click 1</a>or like this:
<a href="/modal/eform/submit/test-form/nojs/0" class="ctools-use-modal ctools-modal-modal-popup-small">Click 2</a>and they both dont work - this error will show in a browser popup:
How to fix?
Is there anything more I need to add in custom code?
Any dependency?
Comment #9
maximpodorov commentedI see no leading slash in the address.
Is the machine name of your form "test-form"? Usually, it can't contain dash symbol.
So, please try this address:
Comment #10
kopeboythe machine name is test_form but the URL would become test-form.
Actually I am now investigating my theme (Radix) because other modals dont load either.
Will come back soon. Thanks for your fast reply!
Comment #11
kopeboyOk. My error. The problem was with the Radix theme.
I solved upgrading to their latest dev version, and now
modal & modal_entityform work right out of the box, also with correct Boostrap modal styling.
Please can you clarify in your module's page that "modal_forms" module is not needed?
Thanks!
Comment #12
maximpodorov commentedHmm, I can't list all the modules which are not required. :)
Comment #13
nicolas bouteille commentedI found your module reading this post. http://drupal.stackexchange.com/a/108956/30402
I agree that if Modal forms is not required you could mention it. You don't need to talk about all the modules that are not required, just those that people get confused with ;)