I am using the Alpha-5 version with latest Drupal 8. I got fatal error when deleting any vocabularies or terms. The error points to my Ubercart catalog module php file. Can you help further check this:

Fatal error: Call to a member function getVocabularyId() on null in /modules/ubercart/uc_catalog/src/Access
/RouteProcessor.php
on line 49

CommentFileSizeAuthor
#5 contentofterm.png20.42 KBofenX
#5 cataloglist.png50.3 KBofenX

Comments

danghoaiphuc created an issue. See original summary.

tr’s picture

Status: Active » Postponed (maintainer needs more info)

I can't reproduce this.

I set up a clean site on simplytest.me, enabled the core Ubercart modules plus Catalog, then went to /admin/structure/taxonomy and created three terms in the catalog vocabulary and three terms in the tags vocabulary. Then I tried to delete a term from the catalog from /admin/structure/taxonomy/manage/catalog/overview, and I was able to do that without error. Then I tried to delete a term from the tags vocabulary from /admin/structure/taxonomy/manage/tags/overview, and I was able to do that without error. Then I tried to delete the tags vocabulary, and I was able to do that without error.

danghoaiphuc’s picture

I think it would be interrupted with some of my other modules or settings. But the error shows to the path of uc_catalog module. I commented the last code block in file RouteProcessor.php in ubercart/uc_catalog/src/access and it skips that error. Now I can delete but I am not sure if that block of code is important or not. Here Here is the commented code I have made:
public function processOutbound($route_name, Route $route, array &$parameters, BubbleableMetadata $bubbleable_metadata = NULL) {
# if ($route_name == 'entity.taxonomy_term.canonical' && !empty($parameters['taxonomy_term'])) {
# if ($vid = $this->configFactory->get('uc_catalog.settings')->get('vocabulary')) {
# if ($this->entityTypeManager->getStorage('taxonomy_term')->load($parameters['taxonomy_term'])->getVocabularyId() == $vid) {
# $route->setPath('/catalog/{taxonomy_term}');
# }
# }
# }

tr’s picture

I can't do anything unless you can provide a list of steps to reproduce the error, and a detailed description of what you did to cause the error. The best thing would be to do what I did and set up a site on simplytest.me and see if you can reproduce the error there.

ofenX’s picture

StatusFileSize
new50.3 KB
new20.42 KB

Hi,
I have same problem. Now I can't delete any term from catalog and other vocabulary.
Here is images my terms and content of any term.

Now I can't any things.

tr’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

As I said, we can't help if we can't reproduce the error. I listed the steps I tried, and I never got the error. If you still think this is a problem and want it fixed, you need to give me the exact steps to reproduce the error.

ivangrozni’s picture

I'm actually having this same issue. I don't know what steps I can provide other than I click "Delete" and it prompts me if I'm sure, then it shows a 500 error.

Version is 8.2.6

marty.true’s picture

Status: Closed (cannot reproduce) » Active

I'm having this issue as well. Drupal 8.3.7. Deleting any terms causes the 500 error. Re-opening as this now has 3 reported instances of this issue.

tr’s picture

Status: Active » Postponed (maintainer needs more info)

I don't know how many times I have to say it, but unless you can provide exact steps to reproduce this error, there's nothing I can do to help. In #2 I showed exactly what I tried, and I can't reproduce this error. Show me your steps to reproduce the error on a clean site, and show the actual error from your webserver error logs.

tr’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Well, this WORKS for the default configuration, as I detailed in #2.

I suppose this issue may arise if you change the taxonomy settings, add taxonomy fields, or do something else that's not default, but I have no idea what that may be and no one is volunteering any information about their configuration ...

Likewise, this may be due to some other contributed module that messes with taxonomy, but again I have no idea what modules you might be using.

So again, if this issue is affecting you and you want to see it resolved, you need to provide steps to reproduce it. If you're finding it hard to reproduce the error on a clean site, then that should be a hint as to where the problem lies. If you're unwilling to spend the time to write down some steps, then I guess it isn't that important to you. And since I'm maintaining this module as a volunteer, chasing down "bugs" that can't be reproduced is not on my list of priorities.

pascalmortier’s picture

getVocabularyId() is deprecated
Problem is solved by changing /uc_catalog/src/Access/RouteProcessor.php line 49

Change :
if ($this->entityTypeManager->getStorage('taxonomy_term')->load($parameters['taxonomy_term'])->getVocabularyId() == $vid) {

By :
if ($this->entityTypeManager->getStorage('taxonomy_term')->loadTree($vid)) {

But I think it is not that way we have to solve the problem.
In my case it works to delete terms.