Closed (fixed)
Project:
Entity Browser
Version:
8.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Feb 2016 at 08:54 UTC
Updated:
28 Feb 2019 at 14:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
slashrsm commentedThere was similar report in #2512702: Implement configuration UI. I tried to reproduce but was not successful. It would be great if you could share your steps.
Comment #3
rene bakxI have the same issue. I have a drupal 8.0.4 site with two languages enabled and got this module as a dependency on the file_browser module. I suspect the issue is a combination between multilanguage and the config of the settings the file-browser comes with.
Will see if I have some time to investigate my suspicion, can not make a promise it will be this week :)
Comment #4
slashrsm commentedI was finally able to reproduce. This happens if config_translation module is enabled. List of entity browsers will appear with this patch, but translation pages still won't work. I think we'd need to re-think how we handle this. I will check if form wizard allows us to use a more standard naming of parameters in routes.
Comment #5
killua99 commentedOh I didn't knew about this issue, I'm gonna try the patch later.
Comment #6
killua99 commentedOk, the patch 3 solve the callback. Yes I have enable the config_translation module
Comment #7
luksakYes, I also had config_translation enabled. The patch fixed the issue.
Comment #8
slashrsm commentedDifferent approach which I prefer over #4.
Comment #9
eclipsegc commentedLooks like maybe there were some unrelated changes in that patch, so I assume this does an upcasting of the entity? Any big benefits of this? should the Entity Wizard in ctools consider adopting this approach?
Eclipse
Comment #12
slashrsm commentedThis should fix tests.
@EclipseGC: Main issue was the fact that wizard uses "machine_name" for the argument while content_transliation (and possibly others?) on the other hand expects entity type name. This mismatch caused fatals when generating URLs.
EDIT: Yes, this feels like something that could belong in form wizard itself.
Comment #13
arknoll commentedThis patch worked for me. Marking RTBC
Comment #14
esolitosI can confirm that the patch is working also for me on a few different sites (both multilingual and not), great job!
Comment #15
esolitosJust a question to @slashrsm about patch from #12, it works fine but:
Why all those "@file Contains" removals?
Comment #17
slashrsm commentedWe could probably solve this in a nicer way, but it works and I won't have time to look more into this in a foreseeable future.
Thank you all for your feedback.
@esolitos: Those comment blocks are not required any more by the coding standard.
Comment #19
yoruvo commentedI continue to receive this error with the newest development version of the module.
On route /admin/config/content/entity_browser/file_entity_browser_single_image/general/translate
Comment #20
drholera commentedI have the same issue as @ivi.arocom in #19. Any updates on it?
Comment #21
gngn commentedI am using entity_browser 8.x-1.0 (and config_translation) with two enabled languages.
Coming from
admin/config/content/entity_browserand selecting "Translate" I am directed toadmin/config/content/entity_browser/image_browser/general/translatewhere I get"The website encountered an unexpected error. Please try again later."
In the error_log I have:
PHP Exception Symfony\Component\Routing\Exception\MissingMandatoryParametersException:
"Some mandatory parameters are missing ("step") to generate a URL for route "entity.entity_browser.config_translation_overview"."
at [...]/drupal/web/core/lib/Drupal/Core/Routing/UrlGenerator.php line 171
Any ideas?
Update: the original error had
missing ("machine_name", "step")while (like #19) only getmissing ("step").Comment #22
kkri commentedI am also having the same issue as described in #21.
urlRouteParameters() is not being called when you try to translate an entity browser, I think this should be solved by an alterRoutes() call.
Comment #23
handkerchiefSame problem here:
The website encountered an unexpected error. Please try again later.Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("step") to generate a URL for route "entity.entity_browser.config_translation_overview". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 180 of core/lib/Drupal/Core/Routing/UrlGenerator.php).
Drupal\Core\Routing\UrlGenerator->getInternalPathFromRoute('entity.entity_browser.config_translation_overview', Object, Array) (Line: 131) Drupal\Core\Routing\UrlGenerator->getPathFromRoute('entity.entity_browser.config_translation_overview', Array) (Line: 68) Drupal\Core\Render\MetadataBubblingUrlGenerator->getPathFromRoute('entity.entity_browser.config_translation_overview', Array) (Line: 790) Drupal\Core\Url->getInternalPath() (Line: 248) Drupal\config_translation\ConfigNamesMapper->getOverviewPath() (Line: 212) Drupal\config_translation\Controller\ConfigTranslationController->itemPage(Object, Object, 'entity_browser') call_user_func_array(Array, Array) (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 576) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() call_user_func_array(Object, Array) (Line: 153) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50) Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 60) Drupal\shield\ShieldMiddleware->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 657) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)Comment #24
rodrigoaguileraIs good to know that you are experiencing this issue in the 1.3 version but it should be fixed in the dev branch.
Actually someone should confirm first if this happens in the 2.x-dev branch of the module.
Comment #25
handkerchiefI have tested it. Exactly the same error message appears if I want to translate an entity browser.
Drupal Core: 8.4.0
Entity Browser: 8.x-2.x-dev, 8.x-1.3
File Browser: 8.x-1.1+16-dev
Interesting, if I want to translate a file browser (Browser for files), a "access denied" message appears, but I'm logged in as the main administrator with all permissions.
But for all other Entity Browsers that I have created, the "Some mandatory parameters are missing..." error appears.
Comment #26
sistocarta commentedI have the same issue.
Drupal Version 8.4
Any updates on it?
Comment #27
handkerchiefis anyone in charge of this?
Comment #28
gngn commentedMy customer wanted the translations (mainly the submit buttons).
So I ended up "hand coding" the yml files in sites/default/config/language/de/.
Using the original entity_browser.browser.XYZ.yml I came up with something like this:
I imported the configuration (drush cim).
Worked for me.
Comment #29
johnwebdev commentedHave the same issue though it only seems like the Overview page actually is broken:
works as expected.
Edit:
I've been digging into the issue and they ways we can solve this either to adjust the edit_form route name to omit {step} or make an issue for config_translation to allow having more parameters.
URLs are generated in core/modules/config_translation/src/Controller/ConfigTranslationController.php
The URL route parameters are only provided with
And langcodes parameter if add/edit/delete-form.
The config translation module assumes: /admin/config/content/entity_browser/{entity_browser}
and Entity Browser has the following route: /admin/config/content/entity_browser/{entity_browser}/{step} defined.
which means either Entity Browser has to adjust its route, or we need to add an issue to config translation to allow for additional parameters for the edit_form route which is used as base.
I've created core issue: https://www.drupal.org/project/drupal/issues/2926761
Comment #30
gngn commentedCalling
explicitly as johndevman suggested in #29 works - but it only gives me the most basic translations fields and not link_text or submit_text.
Saving it throws
So I am stuck to hand editing language/de/XYZ.yml and importing it as mentioned in #28.
Comment #31
dylan donkersgoed commentedHere's a patch that makes those other fields translatable. It doesn't address the route issue but works with the workaround of manually accessing the add/edit route described in #29.
Comment #32
socialnicheguru commentedComment #33
juandels3 commentedFor those people who want to translate urgently, you can do it by touching the configuration directly from the .yml files. Usually the configuration file is located in config/sync/entity_browser.browser.media_entity_browser.yml, being able to add translations from config/sync/language/es/entity_browser.browser.media_entity_browser.yml in case the translation is in Spanish.
Comment #34
berdirThe route issue should no longer be a problem, as we just removed the ctools wizard/integration, should be a regular edit route now.
Updating the issue title to reflect the latest patch that is just about using the correct schema. Setting to needs work because at least some of these should use type: label instead for a single-line textfield, type text is for multi-line texts with a textarea form element.
Comment #35
primsi commentedAll seem to be a single line text field.
Comment #36
mpp commented@berdir #34, there were already some issues with patches to fix the schema issues. I added them to the references and closed them in favor of this issue.
Since the latest patch here also contains the code from those patches it should probably also fix the wrong use of the one of the keys:
Comment #37
mpp commentedComment #38
berdirThanks, looks good. Removing the t() is the correct thing, but some people might be unhappy if they previously used to translate that through interface translation.
Comment #40
primsi commentedThanks.
Comment #41
oknateThis needs to be added to 8.x-1.x branch, right?
Comment #42
berdirYeah.
Comment #44
primsi commented