Diagnosing and Fixing 1C-Bitrix Exchange Errors

Integration between 1C and Bitrix is stable—until something breaks. Products stop updating, orders don't reach the accounting system, and the logs show `Invalid server response` or `Timeout exceeded`. Most often, the problem lies in the exchange user authorization, a corrupted XML file, or GUID mism

Our competencies:

Frequently Asked Questions

Integration between 1C and Bitrix is stable—until something breaks. Products stop updating, orders don't reach the accounting system, and the logs show Invalid server response or Timeout exceeded. Most often, the problem lies in the exchange user authorization, a corrupted XML file, or GUID mismatch. We are a team of Bitrix engineers who fix 1C and Bitrix exchange errors daily. Our experience: 80% of problems are solved in 2 hours, complex ones in 1–2 days. We'll evaluate your project, propose a plan, and offer a guarantee. Below is a proven diagnostic method that identifies the cause in 15 minutes.

Typical errors: product duplication (duplicate XML_ID), lost orders (incorrect statuses or missing CML2_LINK), mojibake (Windows-1251 encoding). We'll show you how to diagnose and fix them. This article includes concrete SQL queries, curl commands, and PHP code for preventive monitoring.

Our diagnostic method is 3 times faster than standard log analysis—instead of scanning all records, we use pattern-matching for typical errors. Time saved after setting up monitoring: up to 30%.

How to Read the Exchange Log in Bitrix?

Store → Exchange with 1C Log is the first place to check:

  • Green line: exchange successful
  • Red line: error, expand for details
  • No entries: exchange not started (schedule or authorization issue)

Typical messages and their meaning:

Message Cause
Invalid login or password Exchange user blocked or password changed
Invalid server response HTTP 500 on 1c_exchange.php, check PHP error_log
Property PROP_XXX not found Property deleted on site but 1C still sends it
Timeout exceeded PHP timeout when parsing large XML
XML parsing error Corrupted file or incorrect encoding

1C-Bitrix documentation: CommerceML

Direct Request Diagnostics

Check the endpoint manually via curl or Postman:

# Step 1: authorization curl -c cookies.txt \ "https://myshop.ru/bitrix/admin/1c_exchange.php?type=catalog&mode=checkauth" \ -u "login:password" # Step 2: initialization curl -b cookies.txt \ "https://myshop.ru/bitrix/admin/1c_exchange.php?type=catalog&mode=init" 

Response success on the first request means authorization works. Response failure—check user rights and account status.

Why Products Duplicate and How to Fix It?

Worst-case scenario: after exchange, the number of products in the infoblock doubles. Cause: GUID identifiers changed in 1C (database migration, restructuring), Bitrix didn't find existing elements by ID and created new ones.

Diagnostics:

SELECT XML_ID, COUNT(*) as cnt FROM b_iblock_element WHERE IBLOCK_ID = :iblock_id GROUP BY XML_ID HAVING cnt > 1; 

Duplicates: records with the same XML_ID or similar SKU, different ID. Fix:

  1. Match old and new GUIDs via SKU or barcode
  2. Update XML_ID of existing elements to new GUIDs from 1C
  3. Deactivate (do not delete) duplicates
  4. Run exchange again—now 1C finds elements by correct XML_ID

Why Orders Don't Arrive in 1C?

Check:

  1. In exchange settings on the site, the option "Upload orders" is enabled
  2. Order status is included in the list of statuses for upload
  3. Exchange user has access to the sale module

1C creates orders with "unknown items"—the product in the order lacks a CML2_LINK property with a GUID from 1C. Solution: manually fill CML2_LINK or exclude such items from transmission.

Encoding Issues

Older 1C configurations may export in Windows-1251. Signs: mojibake in product names after import.

// In event handler before import if (!mb_detect_encoding($xmlContent, 'UTF-8', true)) { $xmlContent = mb_convert_encoding($xmlContent, 'UTF-8', 'Windows-1251'); } 

In newer UT versions, this issue is resolved—export is always UTF-8.

Case Study: "Lost" Products After DB Migration

A hosting provider migrated the database to a new server with a different MySQL version. After migration, the exchange ran, but 12% of products "disappeared" from the site (status ACTIVE = N). Cause: during migration, several thousand XML_ID values acquired trailing spaces due to differences in handling CHAR and VARCHAR fields. Bitrix didn't find elements by XML_ID with spaces—created new ones, deactivated old ones.

Diagnostics revealed the problem in 15 minutes (SELECT * FROM b_iblock_element WHERE XML_ID LIKE '% %'). Fix: UPDATE b_iblock_element SET XML_ID = TRIM(XML_ID)—and a subsequent exchange restored all products.

Quick Diagnostic Checklist
  • Check the exchange log for entries in the last 24 hours.
  • Execute a curl request to 1c_exchange.php
  • Check the exchange user status
  • Run SQL query for duplicate XML_ID
  • Check the encoding of the last imported XML

What's Included in the Work

  • Exchange log and configuration audit
  • Fix for identified errors (authorization, duplicates, encoding)
  • Preventive monitoring setup
  • Consultation on exchange optimization
  • 30-day guarantee on the result

How to Set Up Preventive Monitoring?

Automatic check after each exchange:

// Suspicious signs—trigger for notification $checks = [ 'deactivated_count' => 'SELECT COUNT(*) FROM b_iblock_element WHERE ACTIVE = "N" AND MODIFIED_BY = 1', 'duplicate_xml_id' => 'SELECT COUNT(*) FROM (SELECT XML_ID FROM b_iblock_element GROUP BY XML_ID HAVING COUNT(*) > 1) t', 'last_exchange' => 'SELECT MAX(TIMESTAMP_X) FROM b_iblock_element WHERE IBLOCK_ID = ' . CATALOG_IBLOCK_ID, ]; 

If the number of deactivated products in one session exceeds a threshold (e.g., 100)—send an alert and block the next session until manual review.

Diagnostic and Fix Timelines

Issue Type Fix Time
Authorization error / timeout 1–2 hours
Product duplication 4–8 hours
Encoding mismatch 1–3 hours
Lost orders during exchange 2–4 hours
Systemic issues after DB migration 1–2 days

Contact us for diagnostics. Order an audit—we'll evaluate your project in 1 day. Certified 1C-Bitrix specialists, 5+ years of experience, over 100 projects. Get a free engineer consultation.