D7: Batch seeding doesn't work when hostname is empty

Created on 15 June 2023, over 1 year ago
Updated 27 June 2023, over 1 year ago

Problem/Motivation

Found this when testing other things. If the Hostname is empty on the main configuration form and you try to trigger a batch on the Seed form, it doesn't work. If you fill in any Hostname, then it works.

Steps to reproduce

  1. Install and configure quant_api module
  2. Make sure you have a few published nodes
  3. Make sure Hostname is empty on /admin/config/services/quant
  4. Go to Seed tab (/admin/config/services/quant/seed)
  5. Check Export nodes and Trigger the batch checkboxes
  6. Click Save and configure button
  7. Result: Batch doesn't run in UI and there is no error shown
  8. Expected: Batch does run
  9. Go back to Config tab
  10. Fill in any valid Hostname and save
  11. Repeat seed steps above
  12. Result: Batch runs in UI as expected

Looking at logs, it shows these types of warnings when the hostname is empty:

Non-200 response code for http://localhost/node 400

and this type of log when it's not empty:

Sending content: http://localhost/node

Headers looks like this when empty:

Array
(
    [headers] => Array
        (
            [Host] => 
            [User-Agent] => Quant (+http://quantcdn.io)
        )

)

Proposed resolution

Debug and figure out how to fix.

Remaining tasks

  1. Debug
  2. Update code
  3. Review and test
  4. Commit :)

User interface changes

The batch job will run as expected.

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

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

Comments & Activities

Production build 0.71.5 2024