Data Errors

Solutions for data-related errors in API Mapper

Data Errors

Fields show empty in YOOtheme

Symptoms: You've mapped fields, but they show blank in YOOtheme.

Possible causes:

  1. Incorrect field path
  2. Data doesn't exist in the response
  3. Caching issue
  4. Mapping to wrong data type

Solutions:

  1. Verify the field path

    • Use the connection tester to see the actual API response
    • Check for typos in field paths
    • Remember: paths are case-sensitive (Titletitle)
  2. Check array access

    • For arrays, use bracket notation: items[0].name
    • For all items: items[*].name (with JMESPath)
  3. Clear caches

    WordPress
    • Clear YOOtheme cache in the Customizer
    • Clear any page caching plugins
    • Clear API Mapper cache in Settings → API Mapper
  4. Check field type

    • Ensure the field type matches the data (Text, Number, Image, etc.)
    • Image fields need a complete URL, not a relative path

"Invalid JSON" / "JSON parse error"

Symptoms: API Mapper cannot parse the API response.

Possible causes:

  • API returned HTML instead of JSON (error page)
  • API returned malformed JSON
  • Response is empty

Solutions:

  1. Test the API directly

    • Open the API URL in your browser
    • Check if you see valid JSON or an error page
  2. Check for redirects

    • Some APIs redirect HTTP to HTTPS
    • Update your URL to the final destination
  3. Verify authentication

    • Some APIs return HTML login pages when auth fails
    • Double-check your credentials
  4. Check Content-Type header

    • Some APIs require Accept: application/json header
    • Add this header in your connection settings

Wrong data displayed

Symptoms: Data appears but it's not what you expected.

Possible causes:

  • Field path points to wrong data
  • Array index incorrect
  • Cached old data

Solutions:

  1. Verify field mappings

    • Use the connection tester
    • Compare your field path with the actual JSON structure
  2. Check array indices

    • [0] = first item
    • [1] = second item
    • Remember arrays are zero-indexed
  3. Clear cache and test

    • Disable caching temporarily
    • Reload and verify data is current

Data not updating

Symptoms: Old data persists even though the source API has new data.

Cause: Caching is working as expected, but cache duration is too long.

Solutions:

  1. Reduce cache duration

    • Edit your connection
    • Set a shorter cache time (e.g., 300 seconds = 5 minutes)
  2. Clear cache manually

    WordPress
    • Go to Settings → API Mapper
    • Click Clear Cache for the specific connection
  3. Disable caching for testing

    • Set cache duration to 0
    • Remember to re-enable for production!

HTML entities in content

Symptoms: You see & instead of &, or " instead of quotes.

Cause: Data contains HTML-encoded characters.

Solutions:

  1. Use a Rich Text element

    • In YOOtheme, use a text element that renders HTML
    • This automatically decodes HTML entities
  2. Check source data

    • Some APIs send pre-encoded data
    • The rendered field in WordPress API is usually decoded

"404 Not Found" for specific data

Symptoms: API returns 404 for some items but not others.

Possible causes:

  • Item doesn't exist or was deleted
  • Item is not published/public
  • URL path is incorrect

Solutions:

  1. Verify item exists

    • Check directly in the source system (WooCommerce, WordPress, etc.)
    • Ensure the item is published/active
  2. Check ID format

    • Some APIs use numeric IDs, others use slugs
    • Verify you're using the correct format
  3. Check permissions

    • Some items may require authentication to access
    • Ensure your API credentials have access

Was this page helpful?

On this page