• Plugin throws following PHP error quite often causing extra noise on the logs.

    Error Level: E_ERROR

    Message: Uncaught Error: Undefined constant "CODEMANAS_TYPESENSE_THUMBNAIL_IMAGE_URL" in {PATH}/search-with-typesense/templates/instant-search-results.php:21

    Stack trace:

    #0 {WP-PATH}wp-includes/template.php(816): require()

    #1 {PATH}/search-with-typesense/includes/Helpers/Templates.php(33): load_template('{WP-PATH}...', false, Array)

    #2 {PATH}/search-with-typesense/includes/Frontend/Frontend.php(155): Codemanas\Typesense\Helpers\Templates->include_file('instant-search-...')

    #3 {WP-PATH}wp-includes/class-wp-hook.php(341): Codemanas\Typesense\Frontend\Frontend->load_php_templates('')

    #4 {WP-PATH}wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array)

    #5 {WP-PATH}wp-includes/plugin.php(522): WP_Hook->do_action(Array)

    #6 {WP-PATH}wp-includes/general-template.php(3213): do_action('wp_footer')

    #7 {WP-PATH}wp-content/themes/{REDACTED}/footer.php(13): wp_footer()

    #8 {WP-PATH}wp-includes/template.php(814): require_once('{WP-PATH}...')

    #9 {WP-PATH}wp-includes/template.php(749): load_template('{WP-PATH}...', true, Array)

    #10 {WP-PATH}wp-includes/general-template.php(92): locate_template(Array, true, true, Array)

    #11 {WP-PATH}wp-content/themes/{REDACTED}/404.php(22): get_footer()

    #12 {PATH}/gravityforms/includes/class-gf-download.php(232): require_once('{WP-PATH}...')

    #13 {PATH}/gravityforms/includes/class-gf-download.php(123): GF_Download::die_404()

    #14 {PATH}/gravityforms/includes/class-gf-download.php(50): GF_Download::deliver('26', '2026/03/1000015...', '68614')

    #15 {PATH}/gravityforms/gravityforms.php(432): GF_Download::maybe_process()

    #16 {WP-PATH}wp-includes/class-wp-hook.php(341): GFForms::init('')

    #17 {WP-PATH}wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array)

    #18 {WP-PATH}wp-includes/plugin.php(522): WP_Hook->do_action(Array)

    #19 {WP-PATH}wp-settings.php(742): do_action('init')

    #20 {WP-PATH}wp-config.php(160): require_once('{WP-PATH}...')

    #21 {WP-PATH}wp-load.php(50): require_once('{WP-PATH}...')

    #22 {WP-PATH}wp-blog-header.php(13): require_once('{WP-PATH}...')

    #23 {WP-PATH}index.php(17): require('{WP-PATH}...')

    #24 {main}

    thrown

    File: wp-content/plugins/search-with-typesense/templates/instant-search-results.php

    Line: 21

    URL: https://www.{REDACTED}.com/index.php?gf-download={REDACTED}.jpg&form-id={REDACTED}&field-id={REDACTED}&entry-id={REDACTED}&hash={REDACTED}
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Sachyya

    (@sachyya-sachet)

    Hi @sippis ,

    The constant shouldn’t have thrown the error cause it’s being properly defined with conditions at Bootstarp.php L106

    Can you verify once? and also are you overriding the templates? Is so, please provide the code.

    Thread Starter Timi Wahalahti

    (@sippis)

    Still seeing this. Not overriding any templates. Based on the stack trace, seems to be related to compatibility with files uploaded and accesses with Gravity Forms.

    Plugin Contributor Sachyya

    (@sachyya-sachet)

    I suppose you are using the shortcode inside the Gravity Forms.

    We are hooking the constant definition on init hook so users can change the placeholder image url using hook. So when using with gravity forms, the template was called before the constant could be defined and so the error occurred. We are looking into better solution for this.

    So for quick fix, you can override the template and use your own URL where the constant is being used in templates/instant-search-result.php L21

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.