Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Entry Slug doesn't work when View is embedded #2207

Closed
rafaehlers opened this issue Nov 14, 2024 · 6 comments
Closed

Custom Entry Slug doesn't work when View is embedded #2207

rafaehlers opened this issue Nov 14, 2024 · 6 comments
Assignees
Labels

Comments

@rafaehlers
Copy link
Contributor

Here's my GravityView Settings:

image

And the View Entry Slug settings:

image

If the View is embedded into a page or on the home page, links to the Single Entry only use the Entry ID:

image

However, if we access the View custom post type directly, the custom entry slug works:

image

Here's a video: https://www.loom.com/share/4062a8d7f60946b29b23cf476b1c4108

Tested on GV 2.31.1

@rafaehlers rafaehlers added the Bug label Nov 14, 2024
@rafaehlers
Copy link
Contributor Author

Copy link
Member

Just a long-shot: Did you try saving Permalinks settings

@rafaehlers
Copy link
Contributor Author

@zackkatz that was the first thing I tried! hehe

@rafaehlers
Copy link
Contributor Author

@doekenorg can you do this one next, please?

@doekenorg
Copy link
Contributor

doekenorg commented Nov 27, 2024

@rafaehlers this is a very tricky one. The problem is, that the hook to determine if we are using custom slugs does not contain the view (ID). Besides that, the setting is based on the actual View. When use the actual View page, we can determine the settings for that View, and make the changes for the Entry. But when you embed a View, or maybe even multiple Views, on a single page; its not possible to determine the settings for that Entry.

To summarize the problem: An Entry is not "connected" to a single View. So you need a way to determine the current View based on the page; which isn't possible (enough) when embedding. So it's not possible to retrieve the View setting for the Entry slug.

Edit: Found a solution #2222

@rafaehlers
Copy link
Contributor Author

Customer notified ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants