Opened 7 years ago
Closed 7 years ago
#44874 closed defect (bug) (invalid)
get_permalink($id) returns different output when on ajax mode.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | critical | Version: | 4.9.8 |
Component: | Permalinks | Keywords: | |
Focuses: | Cc: |
Description
- WordPress version: 4.9.8
- Theme: twentyseventeen
- Active plugins: WPML Multilingual CMS and custom plugin in development
- Observations: For this issue it's needed WPML Multilingual CMS. I found this issue, while developing a custom plugin.
- Setup: Clean install. WPML installed. Hello World post translated to Catalan (any language is valid).
- Problem: When calling get_permalink($id) from an ajax request, using the original post id and the translated post id (1, and 7), it returns the same url, depending on current language.
- Expected: Expected to work like in the frontend or admin pages.
Output for a custom admin page:
id: 10 - permalink: http://localhost:8000/es/hola-mundo/ id: 7 - permalink: http://localhost:8000/ca/hola-mon/ id: 1 - permalink: http://localhost:8000/hello-world/
Output for ajax call with language set to english:
id: 10 - permalink: http://localhost:8000/hello-world/ id: 7 - permalink: http://localhost:8000/hello-world/ id: 1 - permalink: http://localhost:8000/hello-world/
Attachments (3)
Change History (4)
#1
@
7 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
Thanks for your report, @gpisw.
This isn't the place to report issues that are caused or affected by plugins and themes, but for issues in the core WordPress software. Your best bet is to report this on the WPML support forums (WPML is not related to the WordPress project), and if it's determined that the bug is indeed an issue in WordPress core then feel free to reopen this ticket with some more details.
Note: See
TracTickets for help on using
tickets.
output returned from ajax call