admin管理员组文章数量:1192929
I've been using wp-json steadily for a couple years now on a headless CMS project and had no problem getting valid JSON back. I set the website to auto-update all themes, plugins, and WP version. I also added some extra plugins to enhance the wp-json:
- WP Rest Api V2 Multiple PostTypes
- REST API Helper
- Custom Post Types
Today, we started getting invalid JSON back with an "lea" prefix string on the beginning of the JSON for some unknown reason, creating invalid JSON. When I remove this "lea" prefix at the beginning of the JSON, the website works normal again.
Where might I look to see where this "lea" is being added?
I've been using wp-json steadily for a couple years now on a headless CMS project and had no problem getting valid JSON back. I set the website to auto-update all themes, plugins, and WP version. I also added some extra plugins to enhance the wp-json:
- WP Rest Api V2 Multiple PostTypes
- REST API Helper
- Custom Post Types
Today, we started getting invalid JSON back with an "lea" prefix string on the beginning of the JSON for some unknown reason, creating invalid JSON. When I remove this "lea" prefix at the beginning of the JSON, the website works normal again.
Where might I look to see where this "lea" is being added?
Share Improve this question edited Aug 3, 2022 at 22:21 Volomike asked Aug 3, 2022 at 22:12 VolomikeVolomike 1,8652 gold badges18 silver badges20 bronze badges1 Answer
Reset to default 1I found it. There's a bug in the TotalPress.org Custom Post Types plugin in the file:
wp-content/plugins/custom-post-types/custom-post-types.php
At the top of the file, you will see the mistake:
lea<?php
When I remove the lea
, the problem goes away. I'm contacting the plugin developer to let them know. Plugin version was 3.0.12.
本文标签: Strange quotleaquot prefix on wpjson
版权声明:本文标题:Strange "lea" prefix on wp-json 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738476344a2088882.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论