воскресенье, 17 декабря 2017 г.

Vagrant SSH Permission denied (publickey,gssapi-keyex,gssapi-with-mic) fix

If you receive error "Permission denied (publickey,gssapi-keyex,gssapi-with-mic)" or "No more authentication methods to try." in verbose mode on connect via SSH to guest, also noticed that works when you disable provision script, this means your script contains error and so other Vagrant scripts cannot execute for correct SSH working.

Solution is to fix your provision script.

четверг, 23 ноября 2017 г.

fos user bundle promote not working - solution

It is about command
php app/console fos:user:promote admin --super

just logout from user via Symfony Profiler and logon again.

воскресенье, 22 октября 2017 г.

[Behat] how to fix 'Can not load cache for a feature "foo.feature"'

remove folders (for me it was v4.4-dev) in `C:\Users\Admin\AppData\Local\Temp\behat_gherkin_cache` directory.

четверг, 28 сентября 2017 г.

Sylius - The table with name 'sylius_order' already exists

1) be sure you have added your class' model parameter to config.yml, as described in Sylius documentation;

2) be sure you do not use old parent class somewhere else in config.yml - for example, this will cause error below. Do not forget to change it as new class:
sylius_resource:
    resources:
        sylius.accountant:
            classes:
                model: AppBundle\Entity\Order
        sylius.worker:
            classes:
                model: AppBundle\Entity\Order


понедельник, 18 сентября 2017 г.

Sylius Grid component - updatedAt field not found

You should to add needed field in Grid fields and make it sortable. For example, it should look like this:
sylius_grid:    grids:        sylius_admin_product:            fields:                updatedAt:                    type: datetime
                    label: sylius.ui.last_updated
                    options:                        format: d.m.Y H:i
                    sortable: ~

[sylius] cannot delete product, product in use

1. you should delete all orders, where contains product needs to delete.
2. remove all carts where, where remains this product. You can do it with php bin/console sylius:remove-expired-carts . If you need to remove all carts for all days, add parameter sylius_order.cart_expiration_period: to app/config/config.yml and rerun previous command again.

понедельник, 4 сентября 2017 г.

sylius "No locale has been set and current locale is undefined" error after generating slug for taxon

Replace in \Sylius\Bundle\AdminBundle\Resources\private\js\sylius-taxon-slug.js in function below

function updateSlug(element) {
    var slugInput = element.parents('.content').find('[name*="[slug]"]');
    var loadableParent = slugInput.parents('.field.loadable');

    if ('readonly' == slugInput.attr('readonly')) {
        return;
    }

    loadableParent.addClass('loading');

    var data;
    if ('' != slugInput.attr('data-parent') && undefined != slugInput.attr('data-parent')) {
        data = { name: element.val(), parentId: slugInput.attr('data-parent') };
    } else if ($('#sylius_taxon_parent').length > 0 && $('#sylius_taxon_parent').is(':visible') && '' != $('#sylius_taxon_parent').val()) {
        data = { name: element.val(), parentId: $('#sylius_taxon_parent').val() };
    } else {
        data = { name: element.val() };
    }


last else's data to:


data = { name: element.val(), locale: element.closest('[data-locale]').data('locale') };

And after that ajax will work.

воскресенье, 27 августа 2017 г.

Behat "Parent definition "sylius.behat.page.admin.crud.create" does not exist"

[Symfony\Component\DependencyInjection\Exception\RuntimeException]
  Service "app.behat.page.create_book": Parent definition "sylius.behat.page.admin.crud.create" does not exist.
If you recieve this error, try to move your app.behat.page.create_book service from services.yml to contexts.yml.

вторник, 15 августа 2017 г.

Symfony Validation not working at all

Check do you persist or flush on the FormEvents states.

воскресенье, 30 июля 2017 г.

sylius disable all E-mails sending/fix server error after checkout on prod

add in config_prod.yml:
swiftmailer:    disable_delivery: true

Behat no scenarios no steps fix

Remove from your *.feature file : (colon) symbols after Given/When/And.

суббота, 29 июля 2017 г.

Symfony how to debug DQL

use command doctrine:query:dql
For example, php bin/console doctrine:query:dql "SELECT a FROM AppBundle:Attachment a"

вторник, 11 июля 2017 г.

Symfony assets don't create files in web/bundles

After running asset:install, Asset tries to add needed files in web/bundles directory, and then fastyle deletes them. Same behavior appears with --symlink, --relative and other asset directory path.

Solution to me was to update Asset bundle with Composer.

воскресенье, 11 июня 2017 г.

Sylius how to create admin account

Even you have reset database, run sylius:install:setup, where you can set email and password, and it doesn't create DB with sample data.

Sylius "Notice: Undefined index: multiple" error

It means you have not fully configurated WebburzaSyliusWishlistBundle, check its documentation page, pephaps start from config.yml extra lines.

среда, 3 мая 2017 г.

Symfony form TextType not showing label

You should it load manually in Twig with {{ form_label(form.title) }}

вторник, 11 апреля 2017 г.

"Sylius was not able to figure out the current cart" error

Just switch to needed channel in Symfony Debug Toolbar.

пятница, 7 апреля 2017 г.

Cannot add product to cart, indefined index

You should in Admin pages add to your first shipping method amount for new channel, it should not be null.

Cannot install sylius/locale

run composer require sylius/locale ^v1.0.0-beta.1

вторник, 4 апреля 2017 г.

четверг, 12 января 2017 г.

Intellij Idea - "gradle project sync failed" in Android project

Press "Refresh all Gradle projects" in View > Tool Windows > Gradle

вторник, 10 января 2017 г.

CKEditor + Symfony - Cannot read property 'icons'

Be sure in config.yml in "extraPlugins" plugin name is the same as in specified plugin's file plugin.js first row, for example: "CKEDITOR.plugins.add( 'filepreview', {", where 'filepreview' is config.yml's plugin name.

четверг, 5 января 2017 г.

Sonata-Media PublicDownloadStrategy not working in Prod environment

After changing config.yml file, do not forget to clear prod cache (app/console cache:clear -e prod)