Hi,
I installed this module to manage some entities, but in fact, some of my vocabularies needs to be untranslatable, so I left the option "No multilingual options for terms."
However, when I try to delete an existing term, the standard "Delete" button has been replaced by a "Delete translation" button. And when I click on it, it foward me to the url:
http://example.test.com/taxonomy/term/84/translate/delete/en?destination...
And the following message is displayed : "You are not authorized to access this page", even with the super admin user.
So in result, I CANNOT DELETE ANYMORE MY TERMS.
I tried to dig up a little bit and found that the problem comes on the line 1467 of /sites/all/modules/entity_translation/entity_translation.module but could figured out how to solve it.
Thanks in advance for your feedback
| Comment | File | Size | Author |
|---|---|---|---|
| #23 | entity_translation-isTranslationForm_2280567_32.patch | 949 bytes | florisg |
| #3 | entity_translation-isTranslationForm_2280567_3.patch | 951 bytes | rupertj |
Comments
Comment #1
janiskam commentedHi lahode,
I had similar issue when I had the "Taxonomy translation" module turned on. Perhaps it's conflicting with ET.
Comment #2
lahode commentedThanks janiskam,
I confirm the conflict with taxonomy translation
Comment #3
rupertj commentedI have this issue too. I've traced it through to EntityTranslationDefaultHandler::isTranslationForm(), where the language of the form is compared to the language of the term.
In my case, the isTranslationForm() was returning true for terms that aren't translations when the language of the term was undefined and the form was english.
The attached patch fixes the issue for me by returning false here if either the language of the term or the form is undefined.
Comment #4
michphip commentedPatch works for deleting.
Same happens tough when trying to edit/translate pre-existing terms. The translation tab disappeared and if I manually enter teh URL (en/taxonomy/term/26/transate) the same You are not authorized message pops up.
EDIT:
Looking at the db-entry - the reason seems to be that the language defined was set "und" instead of "en"
Comment #5
yazzbe commentedHi,
I had this issue too when Taxonomy Translation was first activated and later on deactivated.
Some taxonomies were no translatebale any more by Entity Translation (no translate tab). Also the orginal language version (english) was not accesible when clicking the edit button. When clicking 'edit' on the original language version (english) I was immediatly redirected to a translated versions (french). Very odd.
To make the page available again for ET in the original language, I did the following:
Voila, original language version is available again for Enity translation.
This took me almost 5 hours. Really glad I found your post :)))
Many thanks.
Comment #6
Smiless commentedHi guys,
I have the same problem for the contend in the webform module.
How can i apply this patch? Never needed to patch a module before...
*found a workaround.
Comment #7
li.fang commentedPatch works for my project, thanks!
Comment #8
gonssalAdding related issue.
Comment #9
atpaust commentedI was trying to use this patch on my project, for its Entity Translation module, but unsuccessful. I was unable to download the mentioned module by using drush command:
drush dl entity_translation-7.x-1.0-beta3+14-dev
Could not locate entity_translation version 7.x-1.0-beta3+14-dev.
I also tried to apply this patch to the current version of http://ftp.drupal.org/files/projects/entity_translation-7.x-1.0-beta4.ta..., and the http://ftp.drupal.org/files/projects/entity_translation-7.x-1.x-dev.tar.gz, but non of them was successfully patch applied, with a message saying there was something missing in the modules.
Any suggestions, would be highly appreciated
Daniel
Comment #10
steinmb commented@atpaust the patch still apply - did your try to read https://www.drupal.org/patch/apply Make sure you run 7.x-1.x-dev before applying the patch. This is my testing patch #3:
Comment #11
atpaust commentedThank you @steinmb, I appreciated your help.
So this patch will work with the newly upgraded 7.x-1.x-dev version, at http://ftp.drupal.org/files/projects/entity_translation-7.x-1.x-dev.tar.gz, right ?
Daniel
Comment #12
teedave commentedI have a related but not the same issue. I could not "Save and translate" terms - I got Access denied message "You are not authorized to access this page"
The answer is easy but well hidden!
In the Entity translation UI admin/config/regional/entity_translation select the Term you want to translate and you'll see a box that is ticked by default "Hide language selector". Untick this, and voila, you can select the appropriate language on your term edit screen and translate it.
Hope it helps someone.
Cheers
Comment #13
littletiger commented@teedave : thanks, that fixed my problem (same as yours)!
- However, I had to drush cc all, first.
- Then, edit some of my terms which had been set to "language neutral" (reason why they couldn't be translated, I guess).
- After saving as your desired language, you can then translate the term.
Comment #14
sinasalek commentedI think this might be related to #2467509: Access Denied on edit / translate tabs of entity
Comment #15
candelas commentedHello
I am actualizing from 7.x-1.0-beta3+7-dev > 7.x-1.0-beta5 in a multilingual site and I've test this problem and I think that it is solved. I create a node, make a translation and deleted in the edit form. Please, could you check if you have problems and like that we facilitate a bit the work for planch? Thanks for your contributions :)
Comment #16
plachYep, an update on this would be welcome, thanks. Btw, an update to the issue summary with proper steps to reproduce the issue, if it is not fixed now, would be even more welcome, see https://www.drupal.org/project/entity_translation#bugfixing.
Comment #17
plachComment #18
Triumphent commentedPatch does not work for me and version 7.x-1.0-beta5+0-dev
So, I can't access the taxonomy term translation table unless I disable the Entity Translation module. Translate tabs then reappear and I no longer get the "access denied" message.
That's for taxonomy terms that existed before the installation of ET. For new terms with the module enabled, I can get to the term's translation table but with a "no translatable field" message for each language. The only way to get access to the translation table with translation enabled through the translate tab is to disable the module. All works well then.
Comment #19
radioflyer commentedI have the same problem, but found a workaround. You can still delete taxonomy terms using the Taxonomy Manager module: https://www.drupal.org/project/taxonomy_manager
Comment #20
Triumphent commented@radioflyer: There is a patch that may solve your problem. It did for me.
https://www.drupal.org/node/1661348
Comment #21
refai85 commentedI am having the same issue, please guide me how to upload the patch#3, I'm using 7.50
Comment #22
steinmb commented@refai85 What version of entity translation are you on? Can you also provide information about how to reproduce this?
Comment #23
florisg commentedRe-rolled #3 to entity_translation 7.x-dev from git (tested on Drupal 7.53.
Used #5 as method
Problem solved.
Comment #24
vitalie commentedTo the original issue..., it seems the access argument is wrong. Patch attached.
Comment #25
vitalie commentedComment #27
stefanos.petrakis@vitalie: that's a really good observation, but I wouldn't touch that line, unless @plach thinks otherwise. It seems to have sth to do with #1661348: I18n Taxonomy integration. Some more background:
a) The
'access_arguments'property is set to point - correctly - to the'%taxonomy_term'autoloader wildcardwhen entity-type-specific menu alterations are called, in this case
entity_translation_taxonomy_term_menu_alter()b) Your patch (#24) modifies what was part of fixing this issue #1661348: I18n Taxonomy integration and specifically, part of this commit (7a45648). So, we need some good reason for reverting that change that solves another issue.
@idevit: Thanks for the patch, but it needs to be applicable and pass the tests before we can look at it.
This issue was originally about a 'delete path' menu router item that is not accessible.
We need clear steps on how to reproduce that specific problem.
If you are having a different kind of problem, please open a new issue.
Comment #28
vitalie commented@stefanos.petrakis, sorry, did not catch that history behind it. I am not sure if "I do not have i18n_taxonomy module installed" is good enough a reason. If one has to have that module to make Delete work, it should be a dependency for entity_translation. I guess, that's also how you can reproduce it - do not install i18n_taxonomy and try to delete a translation.
What can be done then?
Comment #29
vitalie commentedComment #30
vitalie commentedHmm, well here's patch #24 with an extra switch. Maybe this can work?
Comment #31
vitalie commented@stefanos.petrakis, so I looked into point a):
In fact, this is not happening, the access arguments property is not being set correctly. The 'delete' callback is only being set, with wrong access arguments, in
entity_translation_menu_alter(), howeverentity_translation_taxonomy_term_menu_alter()does not alter it.I better stop my attempts at patches, before you can comment.
Comment #32
stefanos.petrakisHey @vitalie, thanks so much for taking the time, let's get this bug!
First of all, it sounds as if you can reproduce the 'delete path' access problem (trying to be specific here).
I, from my side, cannot. So, I need your help to figure out how to.
Here is how I check that the menu items are correctly populated (this can evolve into a simpletest).
The et_menu_alter_analyze.php is attached.
And here is the output I get after running this on my terminal:
Could you run this script too on your side and share the results?
And then, could you tell me what steps I am missing in order to reproduce the problem?
Cheers!
Comment #33
vitalie commentedHey @stefanos.petrakis, I've tried the script and it does print same thing as you mention, however it has a bug!
Please replace the print_r with this:
In fact, you can also search the menu.array file and see that access arguments for delete/% is array(1).
Comment #34
stefanos.petrakisYou're right, sorry about that.
However, after fixing the
et_menu_alter_analyze.phpscript (attached for reference), I still get the correct results:Could you share your menu.array file for cross-checking?
I am attaching mine, around line 17252, you will see, what is also printed out on the terminal, the access argument is 2.
Comment #35
vitalie commented@stefanos.petrakis, I was running an older version of the entity_translation module. So sorry to waste your time. The bug I am experiencing was fixed here:
https://www.drupal.org/node/2885858
Comment #36
vitalie commentedChanging the state, please ignore comments from #24 till this one.
Comment #37
stefanos.petrakisExcellent, we sorted this out then.
And we both put some time into this, no worries.
Thanks for finding the related issue.
Comment #38
joseph.olstadfixed by updating entity_translation to beta7