Forums

Covering OroCommerce, OroCRM, OroPlatform topics, including community updates and company announcements.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Author
    Replies
  • in reply to: Continued Email Sync Issues #26572

    Andrey Mishchenko
    Participant

    Hello, @jonbill

    Seems like this issue is connected with bug at Zend library http://framework.zend.com/issues/browse/ZF2-581.
    It will definitely be investigated by us in the nearest future.

    If you need a quick fix to make it work you may go to Oro\Bundle\ImapBundle\Mail\Storage and wrap the next line in ‘getMessages’ method into try..catch block:

    Then go to Oro\Bundle\ImapBundle\Sync\ImapEmailSynchronizationProcessor::syncEmails method and put the next code in the beginning of ‘foreach’ cycle:

    Best regards,
    Andrey

    P.S. What version of Oro do you use? This may help us to solve the problem more quickly.

    in reply to: User specific SMTP settings for sending mail #33865

    Andrey Mishchenko
    Participant

    Hello, jakabadambalazs!

    Your approach seems fine. There is also another way to achieve your goal described at Symfony documentation:
    Configuring Services with a Service Configurator

    A Service Configurator can be used, for example, when you have a service that requires complex setup based on configuration settings coming from different sources/services

    in reply to: How to send an email which gets logged #35978

    Andrey Mishchenko
    Participant

    Thank you for providing additional information.

    Try to inject @doctrine instead of @doctrine.orm.entity_manager into your service and use getManager method to retrieve an instance of EntityManager inside the service.

    in reply to: How to send an email which gets logged #35976

    Andrey Mishchenko
    Participant

    Hello, cardiac!

    Take a look at https://github.com/orocrm/platform/blob/master/src/Oro/Bundle/ActivityBundle/README.md. `How to enable activity association using migrations` chapter describes how to add email activity association to an entity. In your case it will be something like

    To assign specific email to specific entity you should use Oro\Bundle\EmailBundle\Entity\Manager\EmailActivityManager::addAssociation() method.

    To automatically render related activities you should extend your entitie’s view template from OroUIBundle:actions:view.html.twig.

    Best regards

    P.S. Could you also provide more information about dependency problem you get while using doctrine listener?

    in reply to: How to translate in oro email #35973

    Andrey Mishchenko
    Participant

    Hello, cardiac!

    You are getting this error because Translation Extension is not added into EmailRenderer’s environment.
    Also ‘trans’ filter usage is restricted by Twig’s security policy in sandbox mode (you can find all allowed tags, filters, functions etc at services.yml file of EmailBundle).
    To achieve your goals would be enough to add TranslationExtension to EmailRenderer and resolve usage of ‘trans’ filter. I believe TwigSandboxConfigurationPass class is the right place to add your code:
    const TRANSLATION_EXTENSION_SERVICE_KEY = 'twig.extension.trans';
    ...
    // inside if statement of process method:
    $filters = $securityPolicyDef->getArgument(1); // get allowed filters array
    $filters = array_merge($filters, array('trans')); // add trans filter to it
    $securityPolicyDef->replaceArgument(1, $filters); // set modified argument to definition
    ...
    $rendererDef->addMethodCall(
    'addExtension',
    array($container->getDefinition(self::TRANSLATION_EXTENSION_SERVICE_KEY))
    ); // enable Translation extension for EmailRenderer environment

    That’s it! And don’t forget to clear your cache to recompile service container.

    in reply to: xNoTicks #24998

    Andrey Mishchenko
    Participant

    OroChartBundle uses flotr2 library for building charts.
    xNoTicks configures `noTicks` property for `x` axis
    http://www.humblesoftware.com/flotr2/documentation

    in reply to: doctrine:schema:update ERROR #36869

    Andrey Mishchenko
    Participant

    Hello, Rodolfo

    This answer might help you http://stackoverflow.com/a/21030216/1667170

    in reply to: Grid – update link depending on entity #28293

    Andrey Mishchenko
    Participant

    Hello, jmclane!

    You can create intermediate action as entry point for updating all of your entities, like this

    There is also another a little bit more complex approach:

    • Duplicate `discr` field of your entities to be able to access it from DQL (because of http://www.doctrine-project.org/jira/browse/DDC-3026)
    • Request it in datagrid query
    • Create and register your own Datagrid Property Formatter that extends Oro\Bundle\DataGridBundle\Extension\Formatter\Property\UrlProperty
    • Override getRawValue method and pass there id and type of the record
    • Generate your routes depending on id and type values

    Example of parameters block configuration

Viewing 8 replies - 1 through 8 (of 8 total)
Back to top

You will be redirected to [title]. Would you like to continue?

Yes No

You will be redirected to [title]. Would you like to continue?

Yes No