Make WordPress Core

Opened 4 months ago

Last modified 3 months ago

#54964 new defect (bug)

get_permalink

Reported by: jakubaondrej's profile jakubaondrej Owned by:
Milestone: Awaiting Review Priority: normal
Severity: blocker Version: 5.9
Component: I18N Keywords: needs-patch
Focuses: rest-api, coding-standards Cc:

Description

Hello,

get_permalink does not work well for custom posts with slug rewrite.
E.g. I have implemented articles post type:

<?php
register_post_type('articles',
        array(...
'rewrite'     => array('slug' => _x('articles','slug','mydomain')),...));

'articles' is translateD to slovak language as 'clanky'. But get_permalink({id_of_article}) returns localhost:10010/articles/my-title. It is wrong and i have recieve error 404, because right link is localhost:10010/clanky/my-title.

It works OK for older WP version.

Thanks a lot for any result.

Kind regards,
Ondrej Jakuba

Change History (3)

This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.


4 months ago

#2 @joedolson
4 months ago

  • Focuses accessibility removed

This ticket was mentioned in Slack in #core-test by hellofromtonya. View the logs.


3 months ago

Note: See TracTickets for help on using tickets.