SQUID Media
Forum Replies Created
-
Forum: Plugins
In reply to: [GravityExport Lite for Gravity Forms] Allow Editor to export entriesGreat! If you want to limit the access to certain parts of GF, you can do something like this:
$role = get_role('editor'); $role->add_cap('gform_full_access'); add_action('admin_menu', function () { $user = new WP_User(get_current_user_id()); if (!empty($user->roles) && is_array($user->roles) && in_array("editor", $user->roles)) { remove_submenu_page( 'gf_edit_forms', 'gf_new_form' ); remove_submenu_page( 'gf_edit_forms', 'gf_settings' ); remove_submenu_page( 'gf_edit_forms', 'gf_export' ); //native csv import/export remove_submenu_page( 'gf_edit_forms', 'gf_help' ); remove_submenu_page( 'gf_edit_forms', 'gf_system_status' ); } },9999);Forum: Plugins
In reply to: [GravityExport Lite for Gravity Forms] Allow Editor to export entriesHello Saska,
How did you add the capability to the editor role? When you add the following to your functions.php the editor can access all of gravity forms including the excel-results page:
$role = get_role('editor'); $role->add_cap('gform_full_access');Last note:
Updated plugin to version 1.1.0 containing afix for these issues. Thanks again for your help debugging!
Just added v1.1.0
You can disable these fields by adding this to your functions.php:
add_filter("gfexcel_field_fileuploads_enabled", function () { return false; });of for a specific form use
gfexcel_field_fileuploads_enabled_IDwhere ID is the id of the form.- This reply was modified 8 years, 6 months ago by SQUID Media.
I’m going to push a new version today, so i’ll get back to you. I’ll implement something to make it easier.
Maybe try and re-add the upload field? I don’t know if that is an option.
Try and create a new form, using the same fields. I think there shouldn’t be a problem then.
Every set-up is a bit different so localising these issues is very time consuming. Also, maybe I should be punished for suggesting it 😉 But try and disable these errors for production environment. eg:
WP_DEBUGset tofalse. Anderror_reporting = 0That should fix your problem for the download. Maybe it will give you a clue in the excel output.- This reply was modified 8 years, 6 months ago by SQUID Media.
Hi @alexzien,
This shouldn’t happen. But I don’t believe it’s related to the plugin; but rather to gravity forms itself. The plugin calls a function on the fields that GF provides. That function is giving you an implode error, which is why the plugin cannot give you the excel file (hence the “Cannot modify header information” error).
The upload field tries to give the value, but for some reason it doesn’t have any. That means that the upload field doesn’t contain a
json_encodedvalue. I don’t know why that is happening, but that’s the reason for your first error. And that causes our plugin to fail. So fix the first, and the second will be fixed aswel.Do you have another plugin that does something with the file upload? If so, try disabling that plugin, and try again.
Also, what version of GF are you using, and what version of WP?
Fixed in the newest version. Hitting the shelves one of these days.
Hi @zitomerh, thanks for your patience.
So I tried it out on a multisite, and (after some tinkering, which I believe was only due to my specific setup) I got the 404. And then save the permalink structure again (set it to “Postname”), and the download link worked.
The only thing I found was that i needed to register the plugin in the hook “plugins_loaded” to get plugin to work in the first place.
I think there may be some issue with the generated hash. is there a slash (/) in there perhaps?
Hi @zitomerh,
Thanks for finding out it’s a multisite issue. This narrows down the search allot!
Apparently the plugin doesn’t support multisite. Let me try and find you a cure 😉I’ll get back to you!
I think it might have something to do with an other plugin. When you activate the plugin it registers the permalink structure. If you get a 404, maybe you installed another plugin or flushed the permalinks somehow. I’ll try to make the permalink structure more stable. But for now: when ever you have a 404, reactivate the plugin. It should fix that every time.
Edit: sorry. Saw your original question on page 2 and thought it was a new question. But the advise stands for everyone.
- This reply was modified 8 years, 7 months ago by SQUID Media.
The bugfixes are in version 1.0.2. You can update and remove the code from functions.php.
The code you edited in the plugin will be overwritten by the update.For now you can change the
NONCE_SALTin your wp config to update the url.- This reply was modified 8 years, 7 months ago by SQUID Media.
That’s on the roadmap for a next version. Check out our git repo for open issues.
Ps. You really should remove the links to the excel from your messages. It’s public this way! For privacy reasons.