Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Unable to add products to Catalog, especially if the Catalog has been altered.
This function only exists in one place:
ubercart/uc_product/uc_product.module: if ($taxonomy = module_invoke('taxonomy', 'form_all', 1)) {
Correct syntax exists in uc_catalog.admin.inc
In the current (Drupal 7.12) version, taxonomy_form_all has been removed from the taxonomy module.
Comments
Comment #1
rorschach.rev CreditAttribution: rorschach.rev commentedConfirmed that the same problem exists in the ubercart-7.x-3.x-dev release 2012-Mar-10.
Comment #2
TR CreditAttribution: TR commentedYes, that legacy call to taxonomy_form_all() needs to be fixed.
But the only place it is used is on the advanced search form, and even there it's never called in D7 because the form_alter checks:
The list of args is wrong for D7, so this piece of code is never used.
So I don't see how the taxonomy_form_all() call has anything to do with the title of this issue. Can you please explain what you mean when you say "Unable to add products to Catalog" ? On what page, and what exactly are you doing? What error message are you getting?
Comment #3
rorschach.rev CreditAttribution: rorschach.rev commentedThank you for your reply!
Store, Configuration, Catalog:
Catalog Display: Grid
Catalog Vocabulary: Products
(checked) Display the catalog breadcrumb.
The taxonomy vocabulary Products is set as the product catalog.
Store, Products, Select a Product, Edit
Catalog: - None - (and has no other options). <<<<<----------- (main issue)
I tried the repair catalog button as well.
< div class="field-type-taxonomy-term-reference field-name-taxonomy-catalog field-widget-options-select form-wrapper" id="edit-taxonomy-catalog">
< div class="form-item form-type-select form-item-taxonomy-catalog-und">
< label for="edit-taxonomy-catalog-und">Catalog < /label>
< select id="edit-taxonomy-catalog-und" name="taxonomy_catalog[und]" class="form-select">< option value="_none">- None -
< /option>< /select>
< /div>
So as far as I can tell, without knowing the data formats returned, uc_product has the incorrect query and uc_catalog.admin.inc uses a correct query, but I didn't see an example that attempted to return the same data format. If there is a module that supersedes uc_product's catalog/taxonomy functions I'm willing to switch. This is the default (core+ubercart only) code in place after having replaced the original Catalog. (The default code may work as long as you don't change the default data.)
Comment #4
rorschach.rev CreditAttribution: rorschach.rev commentedThis is a dev site, so I'd be willing to grant admin access if that would make things easier.
Comment #5
rorschach.rev CreditAttribution: rorschach.rev commentedUpdate please, this should be a very simple fix for the maintainers.
Comment #6
longwaveThis dropdown is provided by the Drupal core Field UI, not Ubercart. I don't understand what vocabularies and fields you have set up, and how you have them configured; please give full details on how you changed the default config so I can try to reproduce this.
Comment #7
longwaveRe: #2
This code has existed since time began and is basically copied from http://api.drupal.org/api/drupal/modules!node!node.module/function/node_.... I'm not sure it was used even in 5.x..?
Comment #8
longwaveRemoved that code from both branches.
Comment #9
rorschach.rev CreditAttribution: rorschach.rev commentedI'm willing to grant temporary admin access to the server if you need to look at things.
I think this will duplicate the bug: delete the default taxonomy, add a new one using "add vocabulary".
Confirm the catalog being used for products at: admin/store/settings/catalog
Find orphaned products: admin/store/products/orphans (shows all products)
Click a product, attempt to assign it to a catalog. No catalogs appear.
Repair catalog field attempt: admin/structure/types/manage/product/fields
Find orphaned products again: admin/store/products/orphans (shows all products)
Click a product, attempt to assign it to a catalog. No catalogs appear again.
Installed are Views, Views UI, UC: Core, Catalog, Payment, Product Attributes, Reports, Roles, Shipping, Shipping Quotes, Product Kit, Stock. Also installed are Rules, Rules UI, Chaos Tools, Chaos Tools Page Manager, Superfish, etc. Captcha, Entity API, and social media plugins are also installed (AddToAny, etc)
Comment #10
longwaveI'd prefer it if you answered my questions in #6. Are you using the provided taxonomy_catalog field, or another field? When you deleted and recreated the vocabulary, did you also change the taxonomy_catalog field settings so it uses this new vocabulary?
I think this is basically the same problem that #1516598: Deprecate uc_catalog_vid in favour of taxonomy_catalog field configuration will solve.
Comment #11
rorschach.rev CreditAttribution: rorschach.rev commentedI'm using the default field for a newly created taxonomy. I'm assuming that is taxonomy_alternative after I read the provided links. It sounds like I'm having the issue they are. Where can I validate which taxonomy type I'm using for certain? I tried checking the Field and Taxonomy modules. Did not see where to look inside the database itself to validate. I will keep looking for positive confirmation.
Comment #12
longwaveNo, you must use the Ubercart provided "taxonomy_catalog" field for the catalog block to show up correctly.
The issue linked in #10 will help reduce confusion firstly by removing the redundant "vocabulary" selection in the catalog settings, and then later allowing the field to be configurable so you could select "taxonomy_alternative" instead of "taxonomy_catalog".
Comment #13
rorschach.rev CreditAttribution: rorschach.rev commentedThe code released in issue #10 breaks the server when I made identical modifications to my store. The eventual resolution of issue #10 will indeed resolve the issue I'm having. Is there a specific code release I should use? I'm glad that the code is improving, but I'm wondering how to fix the issue I'm having where I can't add products to the visible list. Some people want their website to work :/
Comment #14
rorschach.rev CreditAttribution: rorschach.rev commentedBecause of this bug, lack of response, lack of support, I am no longer using UberCart. Thanks for the links, but if a link says "yeah we should fix this" that isn't a solution. If they say, "Here is a horrible hack to make it work" but the horrible hack doesn't work, then that isn't a solution.