The "Back" link on the Single Entry page goes to the View CPT and not the page when using the DataTables Layout
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
@Mwalek, please reproduce/confirm. Once done, please tag and assign to @omarkasem.
Confirmed! I was able to reproduce the problem only when using the DataTables Layout.
@omarkasem assigning this to you ...
@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
Closing because the important issues are on the DT repo now.