Skip to content

Conversation

lockland
Copy link
Contributor

When we do a tag update startDate and endDate is submitted as a empty
string that is converted to 0000-00-00 00:00:00 on database. That
conversion cause an ExceptionInvalidDateBeforeFirstWebsite exception
when We try to update tags again or publish a new version broken the
whole tagmanager plugin

When we do a tag update startDate and endDate is submitted as a empty
string that is converted to 0000-00-00 00:00:00 on database. That
conversion cause an ExceptionInvalidDateBeforeFirstWebsite exception
when We try to update tags again or publish a new version broken the
whole tagmanager plugin
@tsteur tsteur merged commit 227c354 into matomo-org:master Oct 30, 2019
@lockland lockland deleted the fix-wrong-date branch October 30, 2019 18:12
@mikkoHonkanen
Copy link

We are facing the same bug as described in the original ticket. We already tried to fix it by updating the config with the provided solution but it doesn't solve the error. Creating and editing tags are OK but once creating a new version the Tag Manager breaks on error:
"Start date: The date ‘-0001-11-30’ is a date before first website was online. Try date that’s after Aug 6, 1991 (timestamp 681436800).: -62169984000"

@lockland
Copy link
Contributor Author

lockland commented Nov 11, 2019

We are facing the same bug as described in the original ticket. We already tried to fix it by updating the config with the provided solution but it doesn't solve the error. Creating and editing tags are OK but once creating a new version the Tag Manager breaks on error:
"Start date: The date ‘-0001-11-30’ is a date before first website was online. Try date that’s after Aug 6, 1991 (timestamp 681436800).: -62169984000"

Hello @mikkoHonkanen, to really solve that problem you have to update your database setting all invalid dates to null after have the patch applied. The query is below.

update <prefix>tagmanager_tag set start_date =null, end_date = null where start_date = '0000-00-00 00:00:00';

OBS: Change < prefix > to the word you use as prefix on matomo wizard.

@mikkoHonkanen
Copy link

mikkoHonkanen commented Nov 12, 2019

@lockland thank you! That fixed our problem.

lockland added a commit to lockland/tag-manager that referenced this pull request Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants