-
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update checks for zeroed dates cause admin area to break #694
Comments
I get this exact issue on my server, but I'm running Percona which has NO_ZERO_DATE set, it seems, internally by default and I can't find a way to change it. Presumably, your MySQL setup has that setting applied somewhere in its config files, which is why you're seeing the issue. In my case, I "fixed" it by modding
I have no idea if that works under other MySQL clients that don't have that setting applied. If it does, then maybe it's a good enough patch to help both camps of people. Anyone care to test it and report back? Oh, and a related topic: http://forum.textpattern.com/viewtopic.php?id=46973 |
I don't think the At any rate, your suggested fix works for me, at least in the sense that the admin area is functional, without errors. Whether it actually selects zero-valued dates in strict mode - or even whether it is possible to have legacy zero-valued dates in strict mode (for example, by having an installation where it was turned off in the past, had some zero-value dates inserted, then turned on) - I have no idea. But at least this works in a fresh install on current MySQL versions with their default settings. |
For me, running:
Your mods fixed the problem for the one site where I had the same error that @DarkerStar was getting, and no further errors appeared. But in another local site just updated to 4.6 beta, I have a different error which the mods did NOT fix. Traceback is:
The default values for all date/time records in my textpattern table are |
It looks like the answer to my question is yes, the default values should be empty fields, according to the other site's textpattern table that your mods fixed. However, Sequal Pro is not letting me edit the default values. Any suggestions? |
@wion I ran into the same issue after upgrading to Ubuntu 16.04/MySQL 5.7.13, then upgrading Textpattern 4.5.7 to 4.6.0-beta2. I used the MySQL command line client to drop the default values as follows:
Some tables (including the
This results in the default value being |
Oh, also had an issue with the |
@jwoldan, thanks. I got the database wrangled a while back, the hard way. :{ I just updated to beta2, though and get the truncation errors again inside the admin-side, so I think I need to do the file edit thing again that Bloke mentions above. Hopefully that's all I'm facing here. I'm guessing this is the one bugaboo that is holding up the 4.6 release, but can't say for sure. I haven't dared begun to worry about the production server yet, which is style idling unhappy with 4.5.7. |
Confirming... editing the |
Is this still an issue, or has it been resolved now? |
Still an issue on some MySQLs or clones thereof. I have a patched file that I use for my Percona install which uses |
On MySQL 5.7, But it is |
Bumping this for clarity - @bloatware @Bloke: could we spin this out into a docs site article with the appropriate workaround code? |
@Bloke @bloatware I was running into this NO_ZERO_DATE issue with MySQL 5.7.x and upgrading to Textpattern 4.7.1 as well. In my case, I happened to be upgrading from Txp 4.5.4, so I had to pull in @bloatware's commit in Txp 4.7.2 which temporarily disables NO_ZERO_DATE in |
Thanks, done in 4.7.2. |
Just installed the most recent textpattern (so commit 87aff51) on an Ubuntu 16.04 server - PHP 7.0.6, MySQL 5.7.12 - and the admin area was unusable, stuck on the Admin -> Languages page (though the site itself seems to work).
The traceback I got was:
The offending line in
_to_4.6.0.php
is:And there are a bunch of other lines that check for "0000-00-00" dates, I presume to handle updates and fix issue #591.
When I comment out all 12
safe_delete
andsafe_update
lines that check for "0000-00-00" dates, the admin area appears to work fine.The text was updated successfully, but these errors were encountered: