The bug
Sides and bottom of trapdoors rotate illogically when opened and closed.
[media][media]
[media]
Possible fixes
The sides of trapdoors could be fixed in two ways:
One is to make them work like doors, with three sides that follow the movement of the trapdoor and one "hinged" side that will stay in place. This option works well on orientable trapdoors, but wouldn't work properly on non-orientable trapdoors, such as oak and iron.
The other option is to have all four sides to follow the movement of the trapdoor, but without a hinged side. This would work for both orientable and non-orientable trapdoors.
What files were changed:
mainly, the "...trapdoor_open" models were split into "...trapdoor_bottom_open" and "...trapdoor_top_open", something similar to how it is done in doors.
Related issues
is duplicated by
relates to
Attachments
Comments

Can confirm in 1.16.4 and 20w51a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 1.17.1.

It also affects the bottom faces and almost all the other sides:
[media][media]
[media]

Attached three possible fixes (it is not possible to fix all the problems, that's why I made three options).
[media][media][media]I took into consideration 3 things (which can be compared in the image below):
. Rotation: if the sides follow the rotation of the trapdoor.
. Hinges: if the texture of where the hinges would go remains still when the trapdoor is opened and closed (like doors).
. Direction: if the four sides are in the same direction at the same time.
Fix_1: The sides follow the rotation of the trapdoor and the 4 sides always point in the same direction, but the hinges do not stay in place.
Fix_2: The hinges stay in place, but the sides of the hinges do not follow the rotation of the trapdoor and the 4 sides point to different places.
Fix_3: The hinges stay in place and all 4 sides point to the same direction at the same time, but the sides flip when the trapdoor is opened and closed.
Personally I prefer Fix_1 as it only has one counter and allows me to make more types of columns 😛
[media]
And about what I changed, I had to divide the file "template_orientable_trapdoor_open.json" into "template_orientable_trapdoor_bottom_open.json" and "template_orientable_trapdoor_top_open.json", it was necessary to differentiate those two states, otherwise it would not have been possible to fix the sides of both the bottom and the top. Then I changed some uv values and linked the other files to the new templates.

Can confirm in 21w39a.

Can confirm in 21w40a.

Can confirm in 21w42a.

Can confirm in 1.18 Pre-release 1.

Can confirm in 1.18 Pre-release 3.

Can confirm in 1.18 Pre-release 4.

Can confirm in 1.18 and 1.18.1 Pre-release 1.

Can confirm in 1.18.1.

Can confirm in 1.18.2.

Can confirm in 22w11a.
I would like to request ownership of this ticket as the current reporter has been inactive since 2019. I will keep this report updated and with the necessary information.

Also, the side is just a lazy reuse of the front texture which looks terrible as it is not symmetrical.