Bidding form does not appear in new content type

Created on 14 February 2024, 10 months ago
Updated 15 February 2024, 10 months ago

Problem/Motivation

The auctions bidding form works fine on content type "auction".
Now I need to add another content type, lets say "auction_item".

I have added it, also adding "auction item" in manage field.
Unfortunately the auction bidding form did not shown.
I have tried to set this "auction item" field to active, label hidden, and shown entity as "standard".
Still this bidding form did not shown.
I have change shown entity now as "auctions_frontpage", still the same, no bidding form.

Can you please how can I make this auctions bidding form appear on new content type?
Is this even possible?
Or auctions bidding form is only available under content type "auction" ?

Steps to reproduce

Install Commerce.
Install Auctions, which will add a new content type "auction".
Do setup and create new content under content type "auction".
Add new content type, let's use "auction_item".
Under manage field, add "field_auction_item" just like how it is added to content type "auction".
Create new content under content type "auction_item".
The bidder form is not shown.
I change the the filed to be visible (it is not visible in content type "auction"), still no luck.
Default will show link to auction entity /auction/item/xx.
And if I change in manage field display to show entity reference as view, the result is as seen in the screenshot attached.

Screenshot information
Left is content type "auction_item" with no visible bidder form.
And right is the default auctions module "auction" with visible bidder form.

FYI I use logged in and uid 1 role admin users to run these tests.

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇮🇩Indonesia winnie80

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @winnie80
  • 🇨🇦Canada SKAUGHT

    https://www.drupal.org/project/extra_field

    the bidding form should be an extra field!

  • 🇨🇦Canada SKAUGHT

    - will need field install sets for sites being updated. *above comment placement
    - countdown now has direct theme function (block not needed this way now)

  • 🇮🇩Indonesia winnie80

    thank you.

    so the solution are
    install that "extra_field" module
    and update "auctions" module to the latest ?

    I'm not following, what do you mean by

    need field install sets for sites being updated. *above comment placement

  • 🇮🇩Indonesia winnie80

    I have tried by update "auctions" to 2.1.x-dev
    And install "extra_field" module, but I could not find "BiddersForm" as renderer.

    The countdown is not visibile.
    But the bidding form is still not being renderer.
    See the screenshot
    Left is content type "auction_item" , new custom content type where only countdown is being shown
    Right is content type "auction" , default "auctions" module content type.

    I have checked auctions_node_view() within auctions.module
    Could it not be changed and stright to line 96

    /**
     * Implements hook_ENTITY_TYPE_view().
     */
    function auctions_node_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) {
    $auctionItem = $entity->hasField('field_auction_item') && !$entity->get('field_auction_item')->isEmpty() ? $entity->field_auction_item->referencedEntities() : FALSE;
        if ($auctionItem) {

    Or is there a reason why the bidding form is visible limited to content type "auction" ?

  • 🇨🇦Canada SKAUGHT

    @winnie80
    sorry for the confusion, what i've put into comment #3 and 4 are outlines for me/us todo to make it the module easier for non-coders.. Extra Field provides a plugin we can 'shunt' the auction form on any node.

    if you want to use yourself now and can code it: you can copy the auctions_node_view() in to your own module (rename it to your module), add in the bundle you want -- handle the fields as you need... like we do at this time.

    ---

    have checked auctions_node_view() within auctions.module
    Could it not be changed and stright to

    no: this assumes everyone in every site will always name the field 'auction_item' -- this is not dynamic enough. this is what Extra Field will work with.

Production build 0.71.5 2024