-
Notifications
You must be signed in to change notification settings - Fork 62
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
Fix custom Entry slug on embedded Views (#2207) #2222
Fix custom Entry slug on embedded Views (#2207) #2222
Conversation
@Mwalek Please test this one. All the permalink structures should still work. |
@doekenorg I observed the following issues while testing:
Steps to Reproduce
Issue Summary
|
…when-view-is-embedded
|
@doekenorg, that's strange. I tried in a clean browser and could still replicate the behavior. Could you please try checking the behavior on the URL below and let me know the result? |
Ok, so 1 issue remains; and I'm not sure thats gonna be an easy fix; or if we need to address this immediately. The problem here is that there are multiple views connected to the same form and entries. Every entry get's a single unique ID stored on the entry. If multiple views connect to the same entry; and have different entry slugs, they will keep fighting over the precedence. And a slow DB will cause a timing issue. This problem is not new to this solution; this problem is already part of GravityView; but it showed itself here because of this particular set up. The only solution is to have a new View specific meta key per entry that contains the entry slug for that view, so we can lookup the correct entry based on the combination of the View ID and the slug. This could be a nice addition; but I'm a proponent of adding this as a new feature; and ignore the issue on this PR. @mrcasual do you have any thoughts and or objections to that? |
@doekenorg, is there a slight chance this other issue in the Social Sharing & SEO extension is related to this limitation you've just found out? |
@rafaehlers No, I don't think they are related. |
@doekenorg, sounds reasonable. |
@doekenorg I confirmed that only the issue planned for a future PR persists. No other issue was identified while testing this PR. |
…when-view-is-embedded
@doekenorg, please create a new issue and feel free to merge this PR. |
New issue is #2228 |
This PR addresses #2207
When using shortcodes, its hard to determine the correct View for its settings. This PR records the View when the shortcode is being rendered. Based on that value we can now determine the settings correctly. After the shortcode is rendered it forgets the View.
For testing, also test multiple Views on the same page with different Entry slug settings.
💾 Build file (6dcf3f8).