Решение странной проблемы WordPress: нет адреса сайта, HyperDB, mysql NO_ZERO_DATE
Выглядит это так:
И даже так, хотя я админ:
Ну и если нажать кнопку Submit for Review, в итоге вот так:
С этим что-то нужно делать. На соседних сайтах всё работает нормально, на другом сервере всё работает нормально. Плагин Query Monitor даёт некоторую наводку, где может быть проблема. Это файл db.php от плагина HyperDB. Пробуем удалить этот файл — и действительно, теперь всё работает. Кроме плагина HyperDB, который нужен для поддержки множества баз данных одновременно.
Вспоминаем, что с HyperDB уже были какие-то проблемы, они были связаны с отсутствием поддержки mysqli, нового расширения для работы с mysql. Подобная проблема описана в «Обновление плагина WordPress Form Manager«. Пробуем тот же самый define('WP_USE_EXT_MYSQL', false);, нет, не то.
Дальше смотрим подробнее и выясняется:
|
1 2 3 4 |
INSERT INTO `wp_posts` (`post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_content_filtered`, `post_title`, `post_excerpt`, `post_status`, `post_type`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_parent`, `menu_order`, `post_mime_type`, `guid`) VALUES (1, '2017-11-30 06:13:50', '0000-00-00 00:00:00', '', '', 'Auto Draft', '', 'auto-draft', 'page', 'closed', 'closed', '', '', '', '', '2017-11-30 06:13:50', '0000-00-00 00:00:00', 0, 0, '', '') Unknown Unknown Incorrect datetime value: '0000-00-00 00:00:00' for column 'post_date_gmt' at row 1 |
Проблемы с неверным форматом даты. Гугл подсказывает, что это зависит от режимов mysql, конкретно если в БД включен NO_ZERO_DATE, то дата с нулями работать не будет. Идём в mysql.ini файл настроек нашего mysql-сервера, находим:
|
1 |
sql-mode="STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_AUTO_CREATE_USER" |
И, соответственно, удаляем NO_ZERO_DATE. Перезагружаем сервер mysql, чтобы изменения вступили в силу.
Готово! Странный баг исправлен, в нашем вордпрессе мы опять можем создавать страницы и посты!
Видимо, дело было в том, что плагин HyperDB чуть более фривольно работает с базами данных, и позволяет себе добавлять нулевые даты. А конкретно в нашем случае, БД оказалась настроена на отказ нулевым датам. Отсюда ошибки.
Решение или в том, чтобы отказаться от HyperDB, или в том, чтобы настроить mysql разрешать нулевые даты.





Обсуждение
Interesting analysis! Seeing more PH players dive into esports betting is awesome. Heard 19slot link is building a solid community for casino games too-good sign for growing engagement overall! Definitely a space to watch.
Psst… anyone know where I can grab wc7777download from a reliable source? My internet senses are tingling so I need a confirmed safe site.
Looking for some action? betfest looks pretty promising. I dig their options and competitive odds. Worth taking a look. Explore here: betfest
Heard some whispers about r7bet1. Decent selection of games, from what I saw. Nothing blew my mind, but it’s okay. Take a peek at r7bet1.
E aí, pessoal! Encontrei um app novo, o VZ99App. Alguém já usou? Tô procurando um lugar novo para jogar e queria saber se alguém recomenda. Veja aqui: vz99app
Alright folks, let me tell ya, 365betcassino ain’t messing around. They’ve got the games, they’ve got the vibes, and honestly, I’ve had some pretty sweet wins here. Give it a whirl, you might just surprise yourself! Check ’em out over at 365betcassino.
Pgasialogin, logging in was a breeze. No problems here. Quick and simple, just how I like it. Get logged in yo: pgasialogin
Jatt777game! Been playing a bit here and there. Pretty standard set of games, but runs smoothly. Could be worse, could be better! Give it spin: jatt777game
Yo, Lucky777login’s got the vibes! Easy to get into the game and the interface is slick. Feels like a legit place to chill and try your luck. Check it out, fam lucky777login
23phwin https://www.23phwing.org
r85 https://www.pokerr85.com
pokebet88 https://www.solpokebet88.com
Sulit777: Best Philippines Online Casino & Slots. Easy Sulit777 Login, Register, and App Download for Big Wins. Experience the best Philippines online casino at Sulit777! Get fast Sulit777 login and register access to play top Sulit777 slot and casino games. Sulit777 download the app now for big wins and exclusive rewards! visit: sulit777
9096combet, not the flashiest site, but it gets the job done. Solid betting options and I haven’t had any issues with withdrawals. Worth a try if you like no-frills gambling. Check it out! 9096combet
95ubet95, I had some fun here last night. Nothing crazy, but a good time. If you want to test your luck, try: 95ubet95
Brabetentrar, the site’s pretty easy to navigate. If you are looking for fun gambling: brabetentrar
Gave 9eeebet a shot and I’m not disappointed. Registration was quick, and the interface is user-friendly. Fingers crossed for some big wins! Join the fun at 9eeebet
Bet466 is my new go-to. Simple, straightforward, and good selection. Had a small win already! Give it a try at bet466
The 466betapp is actually pretty good! Works well on my phone and haven’t had any issues. Worth downloading if you’re into betting on the go. Get the app at 466betapp
Hm88comvn is alright in my book. They’ve got most of the big leagues covered. Depositing and withdrawing was straightforward. Its worth a look at hm88comvn
Ketqua888 is mainly about results, keeping track of everything. I have been able to track a team for my own betting strategies. Learn more at ketqua888
Kkkjiliapp is still quite new to me. I gave it a spin last week, and so far so good. The app interface is straightforward and responsive. Why not give it ago at kkkjiliapp
Interesting analysis! Seeing more strategic play in esports is great. Fil777 emphasizes that too – mastering the odds is key, even with quick account setup at fil777 login. Bankroll management is crucial for both!