Skip to content
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 error #128

Open
israelam opened this issue Nov 5, 2019 · 3 comments
Open

Update error #128

israelam opened this issue Nov 5, 2019 · 3 comments

Comments

@israelam
Copy link

israelam commented Nov 5, 2019

I have done a clean installation of siwapp-sf3
I can't perform the db-upgrade process.
The following error is always displayed.

php bin/console siwapp:upgrade-db:0.4-1.0 mysql root root siwapp localhost -vvv
Imported 14 Properties
Imported 10 Series
Imported 6 Taxes
Imported 82 Customers
Imported 0 Products
Imported 39 Estimates

[Symfony\Component\Debug\Exception\ContextErrorException]
Warning: A non-numeric value encountered

Exception trace:
() at /Applications/MAMP/htdocs/siwappsf3/src/Siwapp/RecurringInvoiceBundle/Entity/RecurringInvoice.php:453
Siwapp\RecurringInvoiceBundle\Entity\RecurringInvoice->checkMustOccurrences() at /Applications/MAMP/htdocs/siwappsf3/src/Siwapp/RecurringInvoiceBundle/Entity/RecurringInvoice.php:503
Siwapp\RecurringInvoiceBundle\Entity\RecurringInvoice->preSave() at /Applications/MAMP/htdocs/siwappsf3/vendor/doctrine/orm/lib/Doctrine/ORM/Event/ListenersInvoker.php:102
Doctrine\ORM\Event\ListenersInvoker->invoke() at /Applications/MAMP/htdocs/siwappsf3/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:896
Doctrine\ORM\UnitOfWork->persistNew() at /Applications/MAMP/htdocs/siwappsf3/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1683
Doctrine\ORM\UnitOfWork->doPersist() at /Applications/MAMP/htdocs/siwappsf3/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1639
Doctrine\ORM\UnitOfWork->persist() at /Applications/MAMP/htdocs/siwappsf3/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:579
Doctrine\ORM\EntityManager->persist() at /Applications/MAMP/htdocs/siwappsf3/src/Siwapp/CoreBundle/Command/UpgradeFrom04Command.php:258
Siwapp\CoreBundle\Command\UpgradeFrom04Command->importRecurringInvoices() at /Applications/MAMP/htdocs/siwappsf3/src/Siwapp/CoreBundle/Command/UpgradeFrom04Command.php:83
Siwapp\CoreBundle\Command\UpgradeFrom04Command->execute() at /Applications/MAMP/htdocs/siwappsf3/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /Applications/MAMP/htdocs/siwappsf3/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:846
Symfony\Component\Console\Application->doRunCommand() at /Applications/MAMP/htdocs/siwappsf3/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:191
Symfony\Component\Console\Application->doRun() at /Applications/MAMP/htdocs/siwappsf3/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:80
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /Applications/MAMP/htdocs/siwappsf3/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:122
Symfony\Component\Console\Application->run() at /Applications/MAMP/htdocs/siwappsf3/bin/console:29

siwapp:upgrade-db:0.4-1.0 [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] [] []

@israelam
Copy link
Author

israelam commented Jun 5, 2020

OK I'll try it.
Thanks a lot.

@wmzart
Copy link

wmzart commented Nov 20, 2021

@israelam would it be possible to describe the steps you did with a clean installation? I would like to reproduce but cannot get further due to issue #130

@Xviear
Copy link

Xviear commented Oct 5, 2024

I just had the same issue and I finally fixed by changing the following at the file: src/Siwapp/RecurringInvoiceBundle/Entity/RecurringInvoice.php

from line 435:

switch ($this->period_type) {
    case 'year':
        $unit = '%y';
        break;
    case 'month':
        $unit = '%m';
        break;
    case 'week':
    case 'day':
        $unit = '%a';
        break;
}

You're welcome.

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

No branches or pull requests

3 participants