Doeke Norg
Forum Replies Created
-
Forum: Plugins
In reply to: [Sort Export for Gravity Forms] How to useReleased 1.1.2 with a fix for Gravity Forms No Conflict mode.
Hi @blackstar1991 can you contact GravityKit support with these questions? This support forum is solely for the Gravity Export Lite plugin.
You can find it on https://www.gravitykit.com/support/
Thanks, Doeke
Hi @blackstar1991 can you contact GravityKit support with these questions? This support forum is solely for the Gravity Export Lite plugin.
You can find it on https://www.gravitykit.com/support/
Thanks, Doeke
Forum: Plugins
In reply to: [GravityExport Lite for Gravity Forms] Error when opening a .xlsx@vdemerstreize Thank you for sending the information.
The reason the file is not working, is because the server is registering a Deprecation message. While the deprecation should be fixed; it is not advisable to have these deprecation notices active on a production website.
To remedy this issue for now, please add the following code to either your
functions.php
orwp-config.php
error_reporting(error_reporting() & ~E_DEPRECATED);
This will keep the reporting as it, but exclude deprecation notices.
I’ll make sure we look into the deprecation notice on our end.
Hope this helps you out.
Forum: Plugins
In reply to: [GravityExport Lite for Gravity Forms] Error when opening a .xlsx@vdemerstreize usually this happens because there is some extra output added to the excel file. A whitespace or an error message. Maybe your
functions.php
or a plugin has this extra output.Can you share a broken file with me on [email protected]?
Thanks in advance.
Forum: Plugins
In reply to: [GravityExport Lite for Gravity Forms] Error. cant run the plugin@stewiek Last update; I just released 2.3.1 which is the same version as 2.3.0, but now all files seem to be synced to wp.org.
Again sorry about this. So please update the plugin, and let me know if this resolves your issue.
Kind regards,
DoekeForum: Plugins
In reply to: [GravityExport Lite for Gravity Forms] Error. cant run the plugin@stewiek update, we found the file is actually missing. It might have been lost in transmission when we uploaded the new version to WP.org. will let you know when a patch is available.
Forum: Plugins
In reply to: [GravityExport Lite for Gravity Forms] Error. cant run the plugin@stewiek sorry about that. Will look into providing a fix. I think you might have that file but with a capital C, so CopyShortCode.php. that should be renamed to a lowercase c. So CopyShortcode.php
Forum: Plugins
In reply to: [GravityExport Lite for Gravity Forms] Change CSV CharsetHi @shogathu,
I just wanted to let you know that we’ve released 2.3.0 of GravityExport Lite; which now includes a
gfexcel_renderer_csv_output_encoding
hook to update the character encoding for the CSV output.Something along these lines should do the same for you:
add_action( 'gfexcel_renderer_csv_output_encoding', function ( string $encoding ): string { return 'ISO-8859-1'; } );
Hope this helps!
Kind regards,
DoekeForum: Plugins
In reply to: [GravityExport Lite for Gravity Forms] Change CSV CharsetHi @shogathu,
I looked into it, and you’re right that there isn’t a hook or filter for this. I currently see no way to make this happen, so I’ll try to add a filter for you next week. I’ll let you know when this is released.
Kind regards,
Doeke
@shogathu You are right, I missed the part where the download event is triggered before the entries are retrieved. I’ll look into a better event, maybe just after the download has been rendered.
In either case, I have a (slightly inelegant) solution for you.
$is_download = false; add_filter( 'gfexcel_event_download', function () use ( &$is_download ) { $is_download = true; } ); add_filter( 'gfexcel_output_search_criteria', function ( $criteria, $form_id, $feed_id ) use ( &$is_download ) { if ( ! $is_download ) { return $criteria; } $feed = GFAPI::get_feed( $feed_id ); if ( $feed instanceof WP_Error || ! ( $feed['is_active'] ?? 0 ) || ! $feed['meta'] ) { return $criteria; } $download_at = $feed['meta']['custom-downloaded_at'] ?? 0; if ( $download_at > 0 ) { $criteria['start_date'] = wp_date( 'Y-m-d H:i:s', $download_at ); } // Update feed for next download. $feed['meta']['custom-downloaded_at'] = wp_date( 'U' ); GFAPI::update_feed( $feed_id, $feed['meta'], $form_id ); return $criteria; }, 10, 3 );
So the idea is that we store a
custom-download_at
value on the feed. This way it is scoped to the feed, and not the entire form. Thegfexcel_download_event
only records that we are currently working with a download (and no other reason to retrieve the entries). Then thegfexcel_output_search_criteria
looks for this value. If we are downloading we see if we recorded acustom-download_at
time, and use that as astart_date
. After we updated the criteria, we also update that timestamp for the next download.Please note we need the “pass-by-reference”
&
-sign before the$is_download
to be able to track the changes of the value. Otherwise we would get a static value offalse
. And I’ve usecustom-download_at
because I think we will call the parameterdownload_at
on our end once the time comes. So this will avoid issues when updating later on.I hope this makes sense, and helps you out for now; so you can keep updating the plugins.
Kind regards,
Doeke
Hi @shogathu,
Thank you for reaching out.
Your situation is highly specific, even though I can see why you’d want to use it. However, most people actually want the entire list every time. So I think the way you’ve handled this is fine. There is one thing I would change, and that is to use the existing
gfexcel_event_download
hook. This is actually fired just before the actual download. At that point you can store a timestamp for that specific form.Then you can indeed use the
gfexcel_output_search_criteria
hook to exclude any entries before that timestamp.This question has triggered us to include a timestamp for the latest download in the feed settings. Once this has been added, you can use that value instead of storing it yourself with the
gfexcel_event_download
hook. Here is a link to the Github issue, so that you may keep an eye on that: https://github.com/GravityKit/GravityExport-Lite/issues/194. Unfortunately I can’t provide you with an ETA on this.Hope this helps you out for now.
Kind regards,
Doeke
GravityKitHey @muhammad_omer,
Glad you like it. ??
If you set up the export type as csv, you can select a single notification that will receive the single entry in csv format as an attachment on the notification.
Hope that helps.
Hi @charlesgodwin,
I’m sorry but unfortunately I haven’t had a chance to look into this. If your previous solution doesn’t work anymore with the latest release you can try and change
if ( $is_build ) {
toif ( false ) {
. This will avoid the declaring of the class aliases.I do believe this problem lies more in the other plugin, as they are not scoping the PHP spreadsheet dependency.
I can (maybe) only fix the incompatibility to our plugin, but they can fix it against every plugin. And I think that is a better solution.
Hy @erdoslaszlo,
You can remove the enclosure by adding the following snippet to your theme’s
functions.php
or using a snippet plugin:add_filter( 'gfexcel_renderer_csv_enclosure', '__return_null' );
However, please be careful with this; as any other comma’s that do end up in the output will be seen as delimiters; making for weird output.
To change the delimiter you can use the
gfexcel_renderer_csv_delimiter
-hook. To change it to a semi-colon for example, you would need the following code:add_filter( 'gfexcel_renderer_csv_delimiter', function() { return ';'; } );
I hope this helps you out.
Kind regards,
Doeke