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:
- Incorrect field path
- Data doesn't exist in the response
- Caching issue
- Mapping to wrong data type
Solutions:
-
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 (
Title≠title)
-
Check array access
- For arrays, use bracket notation:
items[0].name - For all items:
items[*].name(with JMESPath)
- For arrays, use bracket notation:
-
Clear caches
WordPress- Clear YOOtheme cache in the Customizer
- Clear any page caching plugins
- Clear API Mapper cache in Settings → API Mapper
-
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:
-
Test the API directly
- Open the API URL in your browser
- Check if you see valid JSON or an error page
-
Check for redirects
- Some APIs redirect HTTP to HTTPS
- Update your URL to the final destination
-
Verify authentication
- Some APIs return HTML login pages when auth fails
- Double-check your credentials
-
Check Content-Type header
- Some APIs require
Accept: application/jsonheader - Add this header in your connection settings
- Some APIs require
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:
-
Verify field mappings
- Use the connection tester
- Compare your field path with the actual JSON structure
-
Check array indices
[0]= first item[1]= second item- Remember arrays are zero-indexed
-
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:
-
Reduce cache duration
- Edit your connection
- Set a shorter cache time (e.g., 300 seconds = 5 minutes)
-
Clear cache manually
WordPress- Go to Settings → API Mapper
- Click Clear Cache for the specific connection
-
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:
-
Use a Rich Text element
- In YOOtheme, use a text element that renders HTML
- This automatically decodes HTML entities
-
Check source data
- Some APIs send pre-encoded data
- The
renderedfield 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:
-
Verify item exists
- Check directly in the source system (WooCommerce, WordPress, etc.)
- Ensure the item is published/active
-
Check ID format
- Some APIs use numeric IDs, others use slugs
- Verify you're using the correct format
-
Check permissions
- Some items may require authentication to access
- Ensure your API credentials have access
Was this page helpful?