etsy / 411

An Alert Management Web Application
https://demo.fouroneone.io
MIT License
971 stars 112 forks source link

Upgrade to 1.4 issues #134

Closed AGirin closed 7 years ago

AGirin commented 7 years ago

Hi!

I updated to 1.4 and nothing works now. Getting this:

[Wed Aug 30 15:01:19 2017] [error] [client 10.1.1.1] except [NONE] UnexpectedValueException: "Invalid key: source" at [/var/www/411/phplib/Model.php:407] 0:[FOO\Model->offsetSet() called at [/var/www/411/phplib/REST/Searches.php:195]] 1:[FOO\Searches_REST->test() called at [/var/www/411/phplib/REST/Searches.php:60]] 2:[FOO\Searches_REST->POST() called at [/var/www/411/phplib/REST.php:108]] 3:[FOO\REST->route() called at [/var/www/411/htdocs/api/searches.php:6]], referer: http://411.test.com/search/31

Thanks!

Andrew

kiwiz commented 7 years ago

Did you get any errors running the migration script?

AGirin commented 7 years ago

I am getting this:

bin/migration.php Migrating from 1.4.0 to 1.4.0 Migration complete!

I was expecting to see something like 1.2 to 1.4.0 but this is not the case.

AGirin commented 7 years ago

Just to give you the steps I took:

Copied existing 411 to 411_old Got release.tar Copied all files from release.tar to 411 Ran this query:

UPDATE 411.searches SET type = "es" WHERE type = "logstash";

Ran migrate script Done.

No search is working now. Main page shows an error.

AGirin commented 7 years ago

I am using mysql btw.

AGirin commented 7 years ago

More errors:

[Wed Aug 30 15:30:56 2017] [error] [client 10.1.1.1] except [NONE] Errno 8: "Undefined index: timezone" at [/var/www/411/phplib/Model.php:329] 0:[FOO\Model->toArray() called at [/var/www/411/phplib/REST/Models.php:62]] 1:[FOO\Models_REST->filterFields() called at [/var/www/411/phplib/REST/Users.php:41]] 2:[FOO\Users_REST->filterFields() called at [/var/www/411/phplib/REST/Models.php:129]] 3:[FOO\Models_REST->FOO\{closure}() called at [:0]] 4:[array_map() called at [/var/www/411/phplib/REST/Models.php:131]] 5:[FOO\Models_REST->read() called at [/var/www/411/phplib/REST/Models.php:289]] 6:[FOO\Models_REST->GET() called at [/var/www/411/phplib/REST/Data.php:109]] 7:[FOO\Data_REST->generateUsers() called at [/var/www/411/phplib/REST/Data.php:16]] 8:[FOO\Data_REST->GET() called at [/var/www/411/phplib/REST.php:107]] 9:[FOO\REST->route() called at [/var/www/411/htdocs/api/data.php:6]], referer: http://411.test.com/searches

[Wed Aug 30 15:31:00 2017] [error] [client 10.1.1.1] PHP Parse error: syntax error, unexpected '?' in /var/www/411/phplib/REST/Dashboard.php on line 90, referer: http://411.test.com/

kiwiz commented 7 years ago

Try manually setting the content of the version.txt file to 1.2 and running the migration script.

AGirin commented 7 years ago

Did that. I thin timezone issues is gone now. But I still get this:

"Invalid key: source"

AGirin commented 7 years ago

I cloned the rule and tried to save it. Got this:

image

kiwiz commented 7 years ago

Weird, looks like the source field never got added. Run these two queries:

ALTER TABLE `searches` ADD COLUMN `source` VARCHAR(64) NOT NULL DEFAULT ""
CREATE INDEX IF NOT EXISTS `searches_source_idx` ON `searches`(`source`)
AGirin commented 7 years ago

Ok, got that working.

Now one more error - when I click on image

I get this:

[Wed Aug 30 16:07:30 2017] [error] [client 10.1.1.1] PHP Parse error: syntax error, unexpected '?' in /var/www/411/phplib/REST/Dashboard.php on line 90, referer: http://411.test.com/

AGirin commented 7 years ago

One more question:

How do I make these:

image

Display in my local time? I think you have a fix for that, please correct me if I am wrong.

kiwiz commented 7 years ago

Hmm, are you running PHP 7.0? If not, you can try replacing that with just $cfg['announcement'];. For local time, check out the /admin settings.

AGirin commented 7 years ago

I did update local time to my local time from UTC but the alerts still show UTC.

AGirin commented 7 years ago

And I believe I am running PHP 5.6

kiwiz commented 7 years ago

Hmm, can you open a separate issue for the timestamp issue?

AGirin commented 7 years ago

Ok, everything is good now. I opened new issue for timestamps.

Thanks a lot for such quick responses!