Skip to content

v.23.04 - bulk_container.php incorrect column name on count parameter causing 500 error #1519

@dgrazier1

Description

@dgrazier1

Describe the bug
bulk import of containers generating http 500 error due to incorrect column specification on count() (v.23.04)

Code in the file as it originally existed:
$st = $dbh->prepare( "select count(RowID) as TotalMatches, CabRowID from fac_CabRow where DataCenterID=:DataCenterID and ZoneID=:ZoneID and ucase(Name)=ucase(:Name)" );

Count should be CabRowID. After manually making change to the bulk_container.php file, the problem was fixed.

To Reproduce
Steps to reproduce the behavior:

  1. Create and save .xlsx file with the following:
    DataCenter | Container | Zone | Row
    -- | -- | -- | --
    A1 | A | A1-1 | A1-1-R1
    A1 | A | A1-2 | A1-1-R2
    B1 | B | B1-1 | B1-1-R1
    B1 | B | B1-2 | B1-1-R2
  2. Go to '...' : Bulk Importer -> Import Container/Datacenter/Zone/Row
  3. Choose .xlsx file and Click Upload
  4. Click Process
  5. See error

Were you able to reproduce this on the dev or demo sites?

Expected behavior
A clear and concise description of what you expected to happen.
Expected it to import the values in the file without error

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Win 11
  • Browser Edge
  • Version [e.g. 22]

Additional context
Changing the line to the following fixed the issue
$st = $dbh->prepare( "select count(CabRowID) as TotalMatches, CabRowID from fac_CabRow where DataCenterID=:DataCenterID and ZoneID=:ZoneID and ucase(Name)=ucase(:Name)" );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions