Skip Navigation

[Resolved] Permalink structure changed in migration

This support ticket is created 2 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by shellyS-2 2 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#2467481

Tell us what you are trying to do?
Hello- I recently took our DEV site live and one Toolset item is not working as expected after migration. I used the below documentation to successfully add a select/dropdown of post titles, so that visitors can directly navigate to a selected post. It works and tests correctly on our dev site (hidden link) dropdown is just under the video.
However, after migrating to our live site (hidden link) the pages do load when selecting form the dropdown, however they are not using the WordPress URL, or the WP Engine Primary domain of athomeapartments.com. and the permalink structure looks to be using page id. Example: hidden link

I have done a database search and replace for athomeapartprd.wpengine.com to hidden link and I have changed the permalink structure from post to numerical and back to reset it but it did not correct this. I have also cleared the server cache.

I am hoping you can assist in getting these to work correctly.

Is there any documentation that you are following?
https://toolset.com/forums/topic/showing-post-titles-as-select-dropdown-in-views-search-form/

Is there a similar example that we can see?
working example: hidden link
not working correctly example: hidden link

What is the link to your site?
hidden link

#2467579

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please try to follow the following Doc that should help you to know how you can migrate existing site to another domain:
- https://toolset.com/faq/how-do-i-migrate-a-wordpress-site-from-one-domain-to-the-other/

You can even consider the plugin "All in one WP Migration":
- https://wordpress.org/plugins/all-in-one-wp-migration/

#2467675

Thanks Minesh, this looks like it will cover the domain discrepancy. However, I am most concerned with the permalink post type structure after the domain.

On our DEV site, it is correct at: /community/boatworks-commons/ [Toolset Post Type/Post Name]
Example: hidden link

On our live site after migration, it is: /?post_type=community&p=8326
Example: hidden link

This is only when using this function:
// Toolset support to add a select/dropdown of post titles, so that visitors can directly navigate to a selected post
// Add Shortcode
add_shortcode('show_custom_title_field', 'show_custom_title_field_fn');
function show_custom_title_field_fn($atts) {
$type = $atts['type'];
if (!empty($type)) {
$args = array(
'post_type' => 'community',
'posts_per_page' => -1,
'post_status' => 'publish',
'order' => 'ASC'
);
$posts_array = get_posts( $args );

if(!empty($posts_array)) {
ob_start();
echo '<select name="post-titles" class="js-wpv-filter-trigger form-control">';
echo '<option value="">Select a community</option>';
foreach ($posts_array as $post) {
echo '<option value="'.$post->guid.'">'.$post->post_title.'</option>';
}
echo '</select>';
return ob_get_clean();
}
}
}

<script>
jQuery(document).ready( function() {
jQuery('select[name="post-titles"]').change( function() {
location.href = jQuery(this).val();
});
});
</script>

When accessing these post types any other way besides the above functions snippet, the permalink structure is correct.

Your assistance is much appreciated.

Thanks!

#2467677

Hi Minesh- I am marking this as resolved. I implemented some server level domain redirects from WP Engine's environment CNAME to the primary domain and that has also corrected the appended post type permalink.

Thank you for your assistance.

thomas.

#2467679

My issue is resolved now. Thank you!