WSOD while trying to create external entity type with xnttdb installed (from ext. entities)

Created on 5 January 2023, over 1 year ago
Updated 23 January 2023, over 1 year ago

Problem/Motivation

White screen of death while trying to create external entity type with module «External Entities Database storage» installed (D 9.5.0). Possibly an xnttdb issue.

Steps to reproduce

Install «External Entities» and «External Entities Database storage», create external entity type.

This issue was originally reported under External Entities (see related issues), check out original issue for additional information.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇭Switzerland janes_p Zurich

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to Needs work over 1 year ago
  • Status changed to Needs review over 1 year ago
  • Status changed to Fixed over 1 year ago
  • 🇨🇭Switzerland janes_p Zurich

    Showing lists and individual rows/endities is working fine now (same provider table as above):

    Read - SELECT provider_id AS "id", * FROM {1:provider} WHERE provider_id = :id
    List - SELECT provider_id, provider_name FROM {1:provider} WHERE TRUE :filters
    Count - SELECT COUNT(*) FROM {1:provider}

    Mappings:

    ID - provider_id
    Title - provider_name
    Description - provider_description
    Provider Identifier - provider_identifier

    I am now trying to use the external entity in a view (to use formatting options). As per «known limitations» of the External Entities module, the Search API module with an index is required. Creating the index raises an error message:

    Query failed: SQLSTATE[42703]: Undefined column: 7 ERROR: column "id" does not exist LINE 1: ...ame FROM "plan_e"."provider" WHERE TRUE ORDER BY id ASC LIM... ^: SELECT provider_id, provider_name FROM "plan_e"."provider" WHERE TRUE ORDER BY id ASC LIMIT 100; Array ( )

    Looks like a mixup of placeholders and real column names.

  • 🇫🇷France guignonv

    I have changed the SQL statements to fully qualified statements as per your documentation, to be on the safe side (and I cleared caches thereafter):

    Read - SELECT p.provider_id, p.provider_name, p.provider_description, p.provider_identifier FROM {1:provider} p WHERE p.provider_id = :id
    List - SELECT p.provider_id, p.provider_name FROM {1:provider} p WHERE TRUE :filters
    Count - SELECT COUNT(1) FROM {1:provider} p

    Still the same error message:

    Query failed: SQLSTATE[42703]: Undefined column: 7 ERROR: column "id" does not exist LINE 1: ...e FROM "plan_e"."provider" p WHERE TRUE ORDER BY id ASC LIM... ^: SELECT p.provider_id, p.provider_name FROM "plan_e"."provider" p WHERE TRUE ORDER BY id ASC LIMIT 100; Array ( )

    Looks like the placeholder id is used in the :filters instead of the column name provider_id, or maybe the colon is missing in front of id.

    That's a different issue. Let's see that in #3335729 🐛 Drupal filters are not using the mapped fields in SQL query Fixed .

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024