GravityView icon indicating copy to clipboard operation
GravityView copied to clipboard

DataTables View won't load data when embedded in a Single Entry List View

Open crbdev opened this issue 1 year ago • 1 comments

When adding a DataTables View (using the "GravityView - View" field in the view editor) to a Single Entry page using the List layout, the DataTables View does not load any data.

  • Create two new Views: a list View and a DataTables view
  • Using the "GravityView - Vew" field, embed the DataTables View into the list View's Single Entry page
  • View it on the front-end

Example: https://flamboyant-swiftlet-eb7a39.try.gravitykit.com/view/business-database/entry/1214/

WordPress 6.6.1 PHP version is: 7.4.33

crbdev avatar Jul 29 '24 05:07 crbdev

@omarkasem, please work on this.

mrcasual avatar Aug 08 '24 23:08 mrcasual

@crbdev @mrcasual I tested that multiple times and it's working fine for me php 7.4 and 8.1 gv 2.28.0 datatables 3.3.7 wp 6.6.1 and 6.6.2

omarkasem avatar Sep 19 '24 07:09 omarkasem

I've tested it on try. and my local install, and it doesn't work. @Mwalek could you please try to reproduce this? Let me know if the steps aren't clear.

CleanShot 2024-09-20 at 11 10 30@2x

crbdev avatar Sep 20 '24 03:09 crbdev

@crbdev I tested with PHP 7.4 and 8.3, but couldn't reproduce.

Perhaps you could have a look at my test and make adjustments or provide further clarification:

https://basecamp.try.gravitykit.com/view/issue-2090-view/

Mwalek avatar Sep 20 '24 22:09 Mwalek

@Mwalek Can you provide me with the login?

crbdev avatar Sep 23 '24 01:09 crbdev

@crbdev here you go, u: admin1 p: test

Mwalek avatar Sep 23 '24 04:09 Mwalek

@Mwalek @omarkasem Thanks! Okay, so the issue only occurs when adding the field to the "Other Fields" section of the View editor

CleanShot 2024-09-23 at 12 31 41@2x

CleanShot 2024-09-23 at 12 31 10@2x

crbdev avatar Sep 23 '24 04:09 crbdev

Thanks @crbdev for clarifying that. It's fixed now with this PR https://github.com/GravityKit/GravityView/pull/2149

omarkasem avatar Sep 23 '24 18:09 omarkasem