Documentation · Troubleshooting
PDF Datasheet Issues
This document covers problems with the print-optimized vehicle datasheet feature of the ADP Car Market Hub plugin, including access, rendering, missing data, images, settings and QR code generation.
When to use this document
Read this document when:
- The datasheet URL (
?as24ci_pdf={post_id}) returns a 404 or a blank page. - The datasheet page opens but some fields, images, or sections are missing.
- The "Print Datasheet" button or link does not appear on vehicle detail pages.
- PDF Manager settings are not being applied to the rendered datasheet.
- The QR code is missing or shows an error image.
Overview
The PDF Datasheet feature renders a standalone, print-optimized HTML page for each vehicle. The page is not a true PDF file — it is an HTML document styled with print CSS that the visitor (or browser automation) converts to PDF using the browser's Print → Save as PDF function. No PHP PDF library is required.
The datasheet is accessed via a query variable appended to the site home URL:
https://your-site.com/?as24ci_pdf={post_id}
Where {post_id} is the numeric WordPress post ID of the vehicle. The page is only rendered for published as24ci_car posts. Drafts, trashed posts, or posts of any other type return a 404 error.
The feature is disabled by default. It must be explicitly enabled in the plugin settings before it will respond to any request.
Requirements
- The plugin must be active.
- The PDF Datasheet feature toggle must be enabled in the plugin settings (the master toggle lives on the Design & Styles tab; template-level configuration is on the PDF Manager tab).
- WordPress permalinks must be functional (plain or pretty).
- The vehicle post must be in
publishstatus. - The visiting browser must support CSS print stylesheets to produce a well-formatted PDF when printing.
Diagnostic steps
Step 1: Confirm the feature is enabled
The PDF Datasheet feature is disabled by default on new installations.
- Go to the plugin admin and open the Features or Design & Styles settings.
- Look for the PDF Datasheet toggle.
- Enable it and save.
- After enabling, flush the WordPress permalink cache by going to Settings → Permalinks and clicking Save Changes.
Step 2: Verify the vehicle post ID and status
The URL format is ?as24ci_pdf={post_id}. If you use the wrong post ID, or the vehicle is not published, you will receive an error:
- An invalid (non-numeric or negative) post ID returns HTTP 400 ("Invalid vehicle ID").
- A post that does not exist, is not of type
as24ci_car, or is not published returns HTTP 404 ("Vehicle not found or not published").
To find the correct post ID:
- Go to the vehicle's edit screen in the WordPress admin.
- The post ID appears in the URL:
?post=12345. - Test the datasheet URL:
https://your-site.com/?as24ci_pdf=12345.
Step 3: Check that the query variable is registered
The datasheet uses the WordPress query variable as24ci_pdf. If another plugin or theme unregisters or conflicts with custom query vars, the datasheet may not trigger.
- After enabling the feature, flush permalinks (Settings → Permalinks → Save Changes).
- If the URL still does not work, check whether a security or caching plugin is stripping unknown query parameters from requests.
Step 4: Diagnose missing fields or sections
The PDF Manager settings (stored in the option as24ci_pdf_manager_settings) control which fields and sections appear on the datasheet. If fields are missing:
- Go to the PDF Manager admin tab.
- Review the Content fields checkboxes. Any field that is unchecked will not appear on the datasheet.
- Review the Layout section for toggles such as Show Gallery, Show Price Box, and Show Contact Information.
- Save the settings and reload the datasheet.
If a field is enabled in PDF Manager but still does not appear, the vehicle may not have data for that field. For example, if the vehicle was imported without a price, the price field will not render even when enabled.
Step 5: Diagnose missing images
The datasheet uses images from two meta fields:
_as24ci_image_ids— images imported from the API._as24ci_manual_image_ids— manually uploaded images.
The datasheet displays a maximum of 5 images regardless of the Image Count setting in PDF Manager. If images are missing:
- Confirm images were imported. Go to the vehicle's edit screen in WordPress and check the Media metabox or image gallery section.
- Confirm the Show Gallery toggle is enabled in the PDF Manager settings.
- If the vehicle has a featured image set but no imported images, the datasheet will use the featured image as a fallback.
- Check that the WordPress Media Library entries for the images are not deleted or corrupted.
Step 6: Check the QR code
The QR code is optional and is disabled by default. When enabled, the datasheet uses the public QR code API at https://api.qrserver.com/v1/create-qr-code/ to generate an image. This is an external service with no authentication requirement.
If the QR code is not appearing:
- Confirm the Show QR Code toggle is enabled in PDF Manager settings.
- Confirm the vehicle's published URL does not contain
autoscout24.in the host — the plugin intentionally suppresses the QR code when the vehicle URL resolves to the AutoScout24 domain. - Confirm the server has outbound internet access to
api.qrserver.comon port 443. In restricted hosting environments, this request may be blocked. - The QR code image URL can be replaced using the
as24ci_pdf_qr_image_urlfilter. If a customization is suppressing the image (by returning an empty string), check your active theme and plugins for this filter.
Step 7: Check seller information
Seller contact information on the datasheet is read from the post author's user meta fields:
| Data | User meta key |
|---|---|
| Display name | as24ci_seller_display_name (falls back to WordPress display_name) |
| Email address | as24ci_seller_email (falls back to WordPress user_email) |
| Phone number | as24ci_seller_phone |
| Address | as24ci_seller_address |
If contact information is missing:
- Go to Users in the WordPress admin and open the post author's profile.
- Check whether the seller profile fields are populated.
- If the seller profile fields section is not visible, confirm the
Seller_Profile_Fieldsclass is active (controlled by plugin bootstrap).
Configuration reference — PDF Manager settings
The PDF Manager settings are stored in the as24ci_pdf_manager_settings option as a serialized array. They are managed in the PDF Manager admin tab.
Branding
| Setting | Default | Description |
|---|---|---|
| Logo | (none) | WordPress media library image ID to use as the dealership logo |
| Show company name | On | Show the seller's display name on the datasheet |
| Show address | On | Show the seller's address |
| Show phone | On | Show the seller's phone number |
| Show email | On | Show the seller's email address |
| Show website | Off | Show a website link |
| Primary color | #0073aa | Accent color for headings and price box |
| Accent color | #1a1a1a | Color for secondary text elements |
Layout
| Setting | Default | Description |
|---|---|---|
| Paper format | A4 | Page size for printing. Supported: A4, Letter |
| Image count | 1 | Number of vehicle images to show (1–5; capped at 5 regardless of this value) |
| Show gallery | On | Include the image gallery section |
| Show price box | On | Show the highlighted price box |
| Show contact | On | Show the contact / seller information block |
QR code
| Setting | Default | Description |
|---|---|---|
| Show QR code | Off | Generate and display a QR code linking back to the vehicle page |
Content fields
The following fields can be individually shown or hidden. All are enabled by default.
| Field key | Label |
|---|---|
title | Vehicle title (also controls Make and Model rows) |
price | Price |
mileage | Mileage |
first_reg | First registration |
fuel_type | Fuel type |
transmission | Transmission |
power | Power (HP and cubic capacity) |
body_type | Body type |
exterior_color | Exterior color |
doors | Doors |
seats | Seats |
emission_class | Emission class |
co2 | CO2 values |
consumption | Energy consumption |
equipment | Equipment list (standard and optional) |
description | Vehicle description or excerpt |
location | Location |
contact | Contact information |
Legal notice
A freeform text field appended at the bottom of the datasheet. Accepts plain text. Useful for legal disclaimers or standard terms of sale.
Operational notes
- The datasheet page is rendered as a standalone HTML document. It does not use the WordPress theme header or footer. Theme CSS, sidebars, and navigation elements do not apply.
- Vehicle data is read from the custom
{prefix}as24_vehiclesdatabase table with a fallback to WordPress post meta. If the custom table does not exist (for example on a corrupted or migrated install), some fields may fall back to post meta values. - The description field uses the post excerpt if one is set; otherwise it uses the first 150 words of the post content.
- The datasheet URL uses a query variable (not a rewrite rule), so it works on both pretty permalinks and plain (
?p=) permalink structures. - There is no authentication requirement to view the datasheet. Any visitor with the URL can access it for any published vehicle. If access restriction is required, it must be implemented at the hosting or CDN level.
Troubleshooting
| Symptom | Likely cause | Check |
|---|---|---|
?as24ci_pdf=123 returns 404 | Feature not enabled, vehicle not published, or wrong post ID | Enable feature; confirm vehicle status; verify post ID |
| Blank page or unstyled output | Theme or plugin conflict interfering with template_redirect | Test with default theme and no other plugins active |
| All fields missing from datasheet | PDF Manager has all fields unchecked | Review field checkboxes in PDF Manager settings |
| Images not showing | Gallery toggle off, or no images imported | Enable Show Gallery; confirm images were imported |
| Seller contact info missing | User meta fields not populated | Fill in seller profile fields on the user profile |
| QR code not showing | Feature not enabled or outbound request blocked | Enable QR toggle; check server outbound access to api.qrserver.com |
| Price shows as empty | Vehicle has no price in _as24ci_price or the custom table | Re-import the vehicle or manually set the price |
| Layout looks wrong when printing | Browser print settings override the CSS | Use Print Preview and check margins, scale, and print background settings |