Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
Forum Replies Created
-
AuthorReplies
-
shouldn’t
http-basic: false
be
http-basic: true
in security_test.yml?
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
how come? isn’t that username? i have user in db with username: admin and email:admin@example.com
now i init my client like this:
123protected function setUp() {$this->initClient([], $this->generateBasicAuthHeader());}I have removed ‘HTTP_X-CSRF-Header’ and headers are now:
REQUEST:
host = [“localhost”]
user-agent = [“Symfony2 BrowserKit”]
accept = [“text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8”]
accept-language = [“en-us,en;q=0.5”]
accept-charset = [“ISO-8859-1,utf-8;q=0.7,*;q=0.7”]
php-auth-user = [“admin@example.com”]
php-auth-pw = [“admin”]
authorization = [“Basic YWRtaW5AZXhhbXBsZS5jb206YWRtaW4=”]
x-php-ob-level = [1]RESULT(401):
cache-control = [“no-cache”]
date = [“Thu, 05 Feb 2015 10:44:30 GMT”]
www-authenticate = [“Basic realm=\”Secured REST Area\””]
content-type = [“text\/html; charset=UTF-8”]key php-auth-user is now correct but i am still getting 401
this is my config_test.yml:
123456789101112131415161718192021222324252627imports:- { resource: config_prod.yml }- { resource: parameters_test.yml }- { resource: security_test.yml }framework:test: ~session:storage_id: session.storage.mock_filecsrf_protection: trueprofiler:enabled: falseservices:twig.extension.debug:class: Twig_Extensions_Extension_Debugtags:- { name: twig.extension }swiftmailer:disable_delivery: trueoro_require_js:js_engine: ~and this is my security_test.yml:
1234567891011121314151617181920security:acl:connection: defaultcache:id: security.acl.cache.doctrineprefix: sf2_acl_firewalls:main:organization-http-basic:realm: "Secured REST Area"provider: oro_userhttp-basic: falseorganization-form-login: falselogout: falseorganization-remember-me: falseanonymous: truethey are both unmodified as they were in the platfom application.
I did a fresh install – all installs fine but still 401
when you say
Then you should debug authentification and check which provider and why restrict access.
where should i start?
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
I have all tests failing for Oro\Bundle\UserBundle\Tests\Functional\ControllersTest
always returning 401I have loaded the fixture Oro\Bundle\TestFrameworkBundle\Fixtures\LoadUserData
I have user with api key in db (i did have it before as well though) and
still 401any other ideas?
thanks
a\
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
actually, looking over response codes I do not get 403(auth error) but 401(unauthorized) – so I am actually a step before it – I dumped my request and response headers:
REQUEST:
host = [“localhost”]
user-agent = [“Symfony2 BrowserKit”]
accept = [“text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8”]
accept-language = [“en-us,en;q=0.5”]
accept-charset = [“ISO-8859-1,utf-8;q=0.7,*;q=0.7”]
x-csrf-header = [1]
php-auth-user = [“admin”]
php-auth-pw = [“admin”]
authorization = [“Basic YWRtaW46YWRtaW4=”]
x-php-ob-level = [1]RESULT(401):
cache-control = [“no-cache”]
date = [“Thu, 05 Feb 2015 09:32:29 GMT”]
www-authenticate = [“Basic realm=\”Secured REST Area\””]
content-type = [“text\/html; charset=UTF-8”]any ideas?
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
here: https://crowdin.com/translate/oro-platform/154/en-it#19286
a\PS: In Dashboard bundle we have translated “Dashboard” to “Cruscotto” but it sounds bad! Have you got a better idea?
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
Huston! We have a problem! On downloading the updated italian translations we get
Could not download translations, error: Error parsing YAML, invalid file “/home/master.mekitcrm.bradipo/oro/app/cache/dev/translations/it_IT/OroEmailBundle/translations/messages.it_IT.yml”
there are strange keys in the yml file even on crowdin – i am creating issues for them pls recheck and remove keys like “1”, “[General]”, etc..
a\
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
First things first! OroCRM is second on my list.
Thanks for all who contributed!
Can you pls upgrade me to proofreader on Crowdin? I want to give a hand to @alendo!
a\
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
Hi @alendo!
we are @100%!!! – all platform translations have been inserted. I am glad you’re working on this as well because I was feeling a bit alone ;)
I have already caught a few translations which, seen in application context, sound strange – we can correct them as we go along such as: “Registra attività” which should be “Registro attività”.
have a good one.
a\
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
Dear @Jedi,
Can you promote me to proofreader on Crowdin? We have nearly finished adding all translations for the platform ~95% but approval is around 6% (as reported by OroPlatform).
Thanks
a\
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
me neither! Have you found a solution for this yet?
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
Thanks! but I don’t think in this case it is of use:
I have this button to open the dialog:1234567891011121314151617181920212223242526{% if referenceableEntityConfig.get("datagrid_name_select") %}{{ UI.clientButton({'dataUrl': path('mekit_relationship_widget_select_items', {id: referenceableElement.id, type: entity_class} ),'aCss': 'no-hash btn-mini btn-primary btn-uppercase','iCss': '','dataId': referenceableElement.id,'title' : "mekit.relationship.select_references.label"|trans|replace({'%s': referenceableEntityConfig.get("label")|trans}),'label' : "mekit.relationship.select.label"|trans,'widget' : {'type': 'dialog','multiple' : false,'reload-grid-name' : referenceableEntityConfig.get("datagrid_name_list"),'stateEnabled': false,'options' : {'dialogOptions' : {'title' : "mekit.relationship.select_references.label"|trans|replace({'%s': referenceableEntityConfig.get("label")|trans}),'allowMaximize': true,'allowMinimize': false,'width': 900}}}}) }}{% endif %}I already have a ‘reload-widget-name’ under the widget section which reloads the datagrid in the page when i trigger the “widget_success:wid” (mediator.trigger(‘widget_success:’ + widget.getWid());) from the dialog. and it works ok – my problem is/was with the datagrid inside the dialog widget.
thanks a lot
a\
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
Sweet! I hooked into ‘oronavigation/js/content-manager’ and I clean up the cached datagrid data before closing my dialog widget this way:
12345678910111213141516171819202122<script type="text/javascript">require(['underscore', 'orotranslation/js/translator', 'oroui/js/widget-manager', 'oroui/js/messenger', 'oroui/js/mediator', 'oronavigation/js/content-manager'],function(_, __, widgetManager, messenger, mediator, navigationContentManager) {widgetManager.getWidgetInstance({{ app.request.get('_wid')|json_encode|raw }}, function(widget) {messenger.notificationFlashMessage('success', __('mekit.relationship.saved.message'));mediator.trigger('widget_success:' + widget.getWid());/*mediator.trigger('widget_success:' + widget.getAlias());*///clear cached datagrid datavar gridNameKey = "grid[{{ referenceableEntityConfig.get("datagrid_name_select") }}]";if(!_.isUndefined(mediator.execute('pageCache:state:fetch', gridNameKey))) {navigationContentManager.saveState(gridNameKey, null);console.log("state is cleared for: " + gridNameKey);}widget.remove();});});</script>It works well! It is a bit different from how you suggested. Is it dirty or can I leave it like this?
thanks
a\
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
Thanks, Tomorrow I’ll try.
I know how to do the first one (probably). I actually realized that the datagrid was not even present when I was trying to reload it (because it is only rendered when the ‘save’ variable is false). ;)
But no clue about the second (event though I think it would be best) – I looked into at contentManager and I can see it has two methods: get and trace. What do I do? Do I just use the get method (which returns a collection object) and just set the returned collection to null?
a\
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
Hi yshyshkin,
Thanks I have read some docs and I actually opted for the solution you used when assigning accounts for Contacts. And I am nearly there – I have one little problem to resolve.
I created a form with two unmapped fields:
123456789101112131415161718192021222324protected function buildFields(FormBuilderInterface $builder, array $options) {$builder->add('appendElements','oro_entity_identifier',array('class' => 'Mekit\Bundle\RelationshipBundle\Entity\ReferenceableElement','required' => false,'mapped' => false,'multiple' => true,));$builder->add('removeElements','oro_entity_identifier',array('class' => 'Mekit\Bundle\RelationshipBundle\Entity\ReferenceableElement','required' => false,'mapped' => false,'multiple' => true,));}My controller action is calling the form handler and successfully intercepts the ‘appendElements’ and ‘removeElements’ form data and does what it has to do.
This is my dialog widget:
123456789101112131415161718192021222324252627282930313233343536{% import 'OroUIBundle::macros.html.twig' as UI %}{% import 'OroDataGridBundle::macros.html.twig' as dataGrid %}<div class="widget-content">{% if saved %}<script type="text/javascript">require(['underscore', 'orotranslation/js/translator', 'oroui/js/widget-manager', 'oroui/js/messenger', 'oroui/js/mediator'],function(_, __, widgetManager, messenger, mediator) {widgetManager.getWidgetInstance({{ app.request.get('_wid')|json_encode|raw }}, function(widget) {messenger.notificationFlashMessage('success', __('mekit.relationship.saved.message'));mediator.trigger('widget_success:' + widget.getAlias());mediator.trigger('widget_success:' + widget.getWid());//not refreshingmediator.trigger('datagrid:doRefresh:{{ referenceableEntityConfig.get("datagrid_name_select") }}');//widget.remove();});});</script>{% else %}{{ dataGrid.renderGrid(referenceableEntityConfig.get("datagrid_name_select"), {ref_el_id: referenceableElement.id}, {} ) }}<div class="form-container">{{ form_start(form) }}{{ form_widget(form.appendElements, {'id': 'appendElements'}) }}{{ form_widget(form.removeElements, {'id': 'removeElements'}) }}<div class="widget-actions form-actions" style="display: none;"><button class="btn" type="reset">{{ 'Cancel'|trans }}</button><button class="btn btn-primary" type="submit">{{ 'Save'|trans }}</button></div>{{ form_end(form) }}</div>{% endif %}</div>When I click the save button it triggers the controller action, data is persisted, messenger shows my message, underlying datagrid in the page is refreshed and the dialog closes.
All is perfect, except for one thing.
If I hit the “select” button which reopens the dialog, the datagrid in the dialog is not up to date (the checkboxes do not reflect the persisted changes). If I hit the datagrid’s refresh button it reloads the datagrid and now persisted changes are visible.
So I tried to add1mediator.trigger('datagrid:doRefresh:{{ referenceableEntityConfig.get("datagrid_name_select") }}');in my code before closing the dialog to force refresh the datagrid but no changes.
Any ideas?
thanks
a\
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
Hi @Jedi, Ciao @alendo,
What’s the story here? We have worked a little – we brought the platform translations to 34% and I am really happy that Alessandra is interested in jumping in. We have concentrated our efforts on the platform and I think before anything else it is to be brought to 100%.
As Alessandra says, the translations are there but they are not approved.
How does the approval process work? Once we have inserted all the translations what else is there to be done so that they can be downloaded and used?
Thanks
a\
oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
-
AuthorReplies