invoiceninja / invoiceninja

A source-available invoice, quote, project and time-tracking app built with Laravel
https://invoiceninja.com
Other
8.24k stars 2.28k forks source link

Only showing @parent when creating an invoice #752

Closed Ahava closed 8 years ago

Ahava commented 8 years ago

Hi,

I'm running the v2.5.0.3 self-host zip and and only get "@parent" when I try to view or create an invoice. I've already cheked the file permissions and updated to the most recent version without success.

hillelcoren commented 8 years ago

Can you check for any errors in storage/logs/laravel.log

Ahava commented 8 years ago

Those are the most recent errors:

http://pastebin.com/SghAU2QH

hillelcoren commented 8 years ago

Can you try loading /update to see if it helps, if it doesn't please check for any new errors.

Ahava commented 8 years ago

Didn't do anything. Just got this error:

` [2016-03-03 20:42:19] production.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to a member function filter() on null' in /var/www/invoiceninja/app/Libraries/Utils.php:277 Stack trace:

0 {main}

`

hillelcoren commented 8 years ago

Can you try running php artisan migrate

Ahava commented 8 years ago

I get this error when trying to run it.

[Illuminate\Database\QueryException] SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'vendors' already exists (SQL: create tablevendors(idint unsigned not null auto_increment primary key,created_attimestamp default 0 not null,updated_attimestamp default 0 not null,deleted_attimestamp null,user_idint unsigned n ot null,account_idint unsigned not null,currency_idint unsigned null,namevarchar(255) null,address1varchar(255) not null,address2varchar(255) not null,cityvarchar(255) not null,statevarchar(255) not null,postal_codevarchar(255) not null,country_idint unsigned null,work_phon evarchar(255) not null,private_notestext not null,websitevarchar(255) not null,is_deletedtinyint not null default '0',public_idint not null default '0',vat_numbervarchar(255) null,id_number` varchar(255) null) default character set utf8 collate utf8_unicode_ci)

[PDOException] SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'vendors' already exists

`

hillelcoren commented 8 years ago

It looks like the vendors migration didn't complete. Can you try commenting out the vendors table in the following migration to see if you can determine why it's failing.

https://github.com/invoiceninja/invoiceninja/blob/master/database/migrations/2016_01_04_175228_create_vendors_table.php

You can run the SQL command select * from migrations to see which migrations have run.

Ahava commented 8 years ago

Commented it out, now I get this error: http://pastebin.com/0y72Wxy8

This is the output which migrations havbe run: http://pastebin.com/cHqSuY2z

hillelcoren commented 8 years ago

Thanks for the info. Please comment out the rest of the migration file until running it provide an error other than 'Base table or view already exists'.

My suspicion is that this is related to MySQL strict mode, you can check your modes by running the following SQL query: SELECT @@sql_mode

Ahava commented 8 years ago

The migrations ran successfully after I commented out everything up until "expenses". I'm not running strict mode and still get the "@parent" error.

This is the only error I get: `[2016-03-05 17:19:26] production.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to a member function filter() on null' in /var/www/invoiceninja/app/Libraries/Utils.php:277 Stack trace:

0 {main}

`

hillelcoren commented 8 years ago

I think that error is because the fonts table or cache isn't populated.

Please try loading /update?clear_cache=true

Ahava commented 8 years ago

Thank you! It's working again.

hillelcoren commented 8 years ago

Great to hear, sorry for all the trouble.