The bug
Villagers sometimes try to pathfind through walls to get to their workstation or to their bed.
Original description
On the way to work, the villager path-finds to the wall of the workshop and gets stuck in the corner outside. Despite having no trouble getting around walls normally, it seems that when heading to work, it is prone to getting stuck and taking invalid routes.
Related issues
is duplicated by
relates to
Attachments
Comments

Saw something very similar happen when playing Fabric 1.14.4, but with beds: Villagers would try to pathfind through walls to get to beds. Haven't encountered this in vanilla yet, though.
To clarify: I encountered the issue in vanilla and used a fabric mod to confirm that the villager indeed tried to pathfind through the wall.
I've confirmed this ticket and it will be the collection ticket for all cases in which villagers try to pathfind through walls from now on.

Also affect illagers from raids. They trying to pathfind villagers though the wall.

Same bug in 19w42a.

Can confirm that this still happens in 19w45b

Affects 20w19a

Affects 20w22a

Your report contained an attachment with an invalid extension, so the attachment was removed.
Please remember to only include crashlogs as text files and images as jpg or png instead of using a Word document
-- I am a bot. This action was performed automagically! Please report any issues in Discord or Reddit
Can confirm in 20w51a.

Please see my post: MC-216626, Which was marked as invalid by the way

Can you add my issue to the duplicated section

Can confirm in 1.17.1 Pre-release 3.

Can confirm 1.18.2.

This is a bug in bedrock as well.
Requesting ownership of this issue as @unknown has not been active for over 4 years.

Still an issue in 24w40a

Still occur in 1.21.4 and 1.21.5, quite annoying (and a quite old bug too 😵 )