GravityView icon indicating copy to clipboard operation
GravityView copied to clipboard

The "Back" link on the Single Entry page goes to the View CPT and not the page when using the DataTables Layout

Open crbdev opened this issue 1 year ago • 3 comments

When you use a block to embed a View into a WordPress page or post, the "back" button on the Single Entry page should go back to the page where the View is embedded. However, if the Single Entry Layout is set to "DataTables Table", this link goes to the View CPT link (i.e., /view/view-name/) instead of the page.

Steps to reproduce:

  • Create a new View using the DataTables View Type
  • Configure the Multiple & Single Entry pages
  • Embed the View on a new page using the block
  • Open the page on the front end; click on an entry to open the Single Entry page
  • Click the "Back" link
  • Confirm that you are taken to the /view/view-name/ CPT, instead of the page where the View was embedded.
  • Change the "Single Entry Layout" to a different View Type using the switcher; confirm the "back" link works as expected.

WordPress 6.6.1 PHP version is: 7.4.33

crbdev avatar Aug 02 '24 07:08 crbdev

@Mwalek, please reproduce/confirm. Once done, please tag and assign to @omarkasem.

mrcasual avatar Aug 08 '24 23:08 mrcasual

Confirmed! I was able to reproduce the problem only when using the DataTables Layout.

Mwalek avatar Aug 09 '24 06:08 Mwalek

@omarkasem assigning this to you ...

Mwalek avatar Aug 09 '24 06:08 Mwalek

@Mwalek @crbdev The issue is in Datatable plugin so i created the issue/PR there https://github.com/GravityKit/DataTables/issues/247 https://github.com/GravityKit/DataTables/pull/248

omarkasem avatar Oct 25 '24 21:10 omarkasem

Closing because the important issues are on the DT repo now.

rafaehlers avatar Jan 10 '25 18:01 rafaehlers