📜 ⬆️ ⬇️

Description of one integration of 1C and Bitrix, and why I do not recommend my clients to use such integration

Kind of this was not, and again the same.

V.S. Chernomyrdin.

I have already spoken about the exchange of data between software products of the 1C family and Bitrix sites in the article Software Integration. Description of the process from a business consultant. But then I told only about the general principles of work. In another article, I wrote about the problems of 1C and Bitrix.

Today I will try not only to describe the problem of integration of Bitrix sites and 1C software products, but I will tell you in detail about the possible pitfalls that experts face, I will describe specific problems, as well as possible solutions.
')
I have already said more than once that software products of the 1C family are distinguished by a large number of bugs, require regular updates, but after installing them very often you have to re-configure the configuration work, as well as all plug-ins, add-ins and data exchange with other components, programs, systems .

It was with such a problem that a client, a representative of a web studio, addressed me not so long ago. Here is what his proposal for cooperation looked like:

Hello! It is urgent to complete the synchronization of the site and 1C, more precisely - to perform the unloading of goods, prices and photos from 1C 8.3 (latest version) to the site. Help is needed urgently, if you are free, write me how to contact you to tell about the problem in more detail. Thanks in advance


Like many colleagues, I am also registered on freelance exchanges, and therefore such requests do not surprise me. I had free time. And although this request came long after midnight, I decided to take on this task.

As I expected, the site was on Bitrix. The customer gave me a remote access, outlined the essence of the problem and I started to work.

So, the source data is as follows:
  1. There is 1C of the Department of Commerce. According to the client - the latest version
  2. Integration has stopped working. Immediately after the update.
  3. The client claimed to be fully updated.
  4. The latest version of Bitrix
  5. What to do?! Everything is lost


Step one. Configuration version


The first thing that I do always is to verify the information that the client gives me. And in the case of 1C, I’ll myself check the current version myself.

In this case, the release of the current configuration was 11.1.9.5. This meant that the configuration was not updated, the version is not the latest .

Naturally, I reported this error to the client, after which I installed the updates myself. The configuration has been updated. Integration has not earned.

When working with 1C, always double check the platform version and configuration! It is very important!
Let me remind you that in the Department of Trade 11 a standard data exchange module between UT.11 and Bitrix is ​​announced. This is a standard built-in module that should work without any additional settings. But in my case after the updates, he did not work. When you start the exchange just did not happen.

Step two. Platform check


Then I checked the release platform. In principle, it is worth checking right away. Personally, I always advise you to always check releases and platforms and configurations yourself. It is so important that I am not afraid to write about it again.

Check the relevance of all releases yourself!

In my case, the platform was all right, the release was the last, the number 8.3.5.1248, which was released 10/31/14. (by the way, while I was writing this article, another update of the platform was released).

So, the platform and configuration versions are fine, but the exchange does not work.

It would seem, then you just need to check the module on the side of Bitrix. But, as practice has shown, in order to find out which module supports the exchange from the side of Bitrix, you need to complete a quest. But let's not get ahead. As I promised, I tell in detail and in order, what and how I did, and what solutions I found.

Step three. Check the integrity of the database


So, the first thing I went to the site of Bitrix. I moved to the next page:

http://1c.1c-bitrix.ru/ecommerce/download.php

From the table that is presented there, I concluded that my configuration exactly corresponds to the version of the exchange module.

Like many colleagues in a similar situation, I turned to the Internet for help. At one of the forums (mista.ru) I found information that if any of the types of exchange does not occur, it is necessary to exclude the violation of the integrity of the database structure from the list of possible problems. In order to perform this action, in 1C there is a built-in tool: testing and repairing the database.

So, the 1C program carried out a long and sufficiently long work, since in this case the database was file-based, many errors were fixed. The total testing and correction time is 40 minutes.
Of course, I had to wait a long time. But everything ends once. And now, after testing, we hopefully launch the exchange. Again there are no results.

Step Four. Special module: will an alternative solution help?


After checking the database did not help, I remembered that I also read on one of the forums that someone from the Bitrix specialists installed a special exchange module and recommended it to everyone. Well. I also went to the Internet to look for this module and find out why it is needed.

I found only one version of the release of this module, intended for version 4.0.5.1. I thought, I decided to try all the same and downloaded this integration module. When downloading, I noticed that the version of this file on my site is far from the first.

My file after downloading was called:

4.0.5.1_ UT_11.1.2 (3) .zip

Thus, it turns out that I am at least the fourth person who tried to solve this problem and downloaded this module.

Next, I still installed this module. In the archive to him is a small brochure, which turned out to be very useful. But the very version of the file did not give me rest. And I decided to ask the client what was my account? In response, I heard that I am already 5 or 6 specialists who are trying to solve this problem.

I already had a sporting interest. Please note: more than an hour has passed, as I began to solve a seemingly simple task, but the problem has not only not been solved until now, but its solutions have not yet been determined.

But still, I installed a module that other experts have already installed to see what happens with the upload.

The first thing I saw was that the module clearly differed from the standard exchange option from 1C, which should work. It was very inconvenient to work with an unusual interface.
In addition, all these actions have not brought any benefit.

Check the version of the data exchange module 1C and Bitrix. There may be several of them simultaneously: several versions, as well as several different configurations.

After trying to install an additional module, I noticed the following inscription at the top of the screen:



After reading this inscription, I thought that this is the latest, most recent configuration. But that was my mistake. Only later I figured out that there is a more recent version and where to download it.

In addition, very carefully you need to monitor the choice of the module. Personally, I initially got confused in these modules for Russia:



In general, what I got as a result of all actions and checks:


Here is such a trick is obtained. Many different modules, but no one wants to work.

What else got me confused. If you click the "1C Requirements" button, you will see the following table:

1c.1c-bitrix.ru/ecommerce/require_1C.php


Here you also have to guess what and how to download.

New exchange module: installation features


So, I nevertheless downloaded a new exchange module and implemented it in the Office of Trade. Naturally, while I removed the configuration from the support. Oddly enough, but a fact:

It would seem that the add-ons were created by 1C specialists for 1C software products, but it is necessary to remove the configuration from support. For the user, this means that the updates will not go through the standard method.

At the same time on the website and in the documentation there are warnings that may even frighten. You are reminded to remind you that in the event of any of your errors, the configuration may stop working altogether.

Do not forget to backup!

Be sure to make backups for any changes, as the configuration may stop working at any of the stages: when updating, during module deployment, during unloading testing. In general, it is better to get an extra Backup than extra problems.

So, I introduced a new module, checked everything, did everything neatly and accurately. As a result, the exchange does not work .

The following error appears:
Unrecoverable error
Error while performing POST request to resource / e1cib / logForm:
because of:
DBMS Error:
SQL Error: Incompatible Types in Expression
because of:
SQL Error: Incompatible Types in Expression


What does it mean? What does this information mean? I was not clear.

To begin, I decided to view the debugger. I spent about half an hour searching for this error and found nothing at all. To be honest, then I doubted that I would cope with the task at all.
I went to look for more information on the topic.

And I found a forum in which I came across such a branch:

http://dev.1c-bitrix.ru/community/forums/forum26/topic19114/?PAGEN_1=65

I safely found the error information on page 65 of the topic.



The moderators' answer was as follows. They gave a link to another topic, while explaining that there is already a solution to this problem, and you can also find many interesting things on this topic.



Of course, I followed the link from the moderators, and there I already learned that the problem lies in the platform.

The developer wrote about this as follows:

Our exchange module is now incompatible with platform 8.3.5.1248. In this platform, it seems, have changed something bad. In order for the module to work, you need to replace the lines of code:
WHEN VARIANTS OF PACKAGINGNOMENCLATURESGoods.Characteristic IS NULL
| Then "" ""

On
WHEN VARIANTS OF PACKAGINGNOMENCLATURESGoods.Characteristic IS NULL
| THEN UNCERTAINED
In the next version of the module will be made the appropriate changes.


What does it mean?

The site administrator 1C Bitrix almost admitted that the error is in the 1C platform.

After I found this information, the error was corrected and the exchange, in general, earned. But specifically all - no.

When unloading, we found that the photos and the nomenclature are transmitted, but the prices are not. Fortunately, I already knew what to do with this problem. On the side of Beatrix, although it would seem that it does not work when exchanging, it is necessary to make one change, namely, in the directory with prices, put a tick “Available to external users”.

Also a strange flaw, I believe. For some reason, not a word has been written about this nuance in the documentation. And at one time I was looking for a solution to this problem using a similar method, i.e. to the touch.

What was the result?


The task was solved successfully. We all set up with the client, the data exchange began to work as it should. We have worked on the part of 1C, the Bitrix specialist has set up work with the data on his part. As a result, it took 3 hours of hard work.

What was this time spent on?


Each action requires a certain amount of time. Updates take from 10 to 15 minutes, indexing and repairing the database takes 40 minutes, each exchange attempt takes from 15 to 18 minutes (if you run a full exchange).
As a result, we spent a lot of time in order to re-configure what worked perfectly before updating the configuration and the 1C platform.

findings


On my own experience, and also on the basis of a careful reading of that very forum thread with integration problems and their solutions, I made the following conclusions:
  1. Bitrix - does or badly interacts with the company 1C. The inscription 1C Bitrix means nothing, except that these software products have common owners.
  2. Setting up a seemingly generic exchange requires remarkable effort, while there is always the risk of running into errors from an unpredictable side. Those. When updating, you need to very clearly understand what configuration is used, the platform, which version of the module is used, and also check if there are any errors for this module.

After I figured out all the nuances that I listed in step 2, I was able to cope with the problem of restoring the work of exchanging data.

And a little more interesting from my personal experience



Now I am working on another project, and I am also faced with a curious situation. I and the specialists with whom I cooperate are responsible for the integration of the site by 1C, and on the side of Bitrix there is a third-party specialist. In principle, from the very beginning we agreed that they would write us a separate download for 1C. But in the process of work, the specialists of Bitrix told us that it was impossible to fulfill this agreement and suggested using a standard exchange.

What is the result:

We need to upload handbooks and data modified by our forces in a typical form.
Thus, we have a clear contradiction. Of course, we will definitely solve the problem this time and another. Here it is important to understand that such overlays and contradictions are constant satellites of everyone who is engaged in the integration of 1C and Bitrix.

If you decide to use the standard exchange



The first thing you need to understand is that the exchange offered to you is universal, and therefore the module itself is very complicated. In addition, even on this page v8.1c.ru/edi/edi_stnd/90/92.htm you will see that there are several versions of this exchange, and, moreover, they change regularly. And in order to fully customize the work of such an exchange and, moreover, to refine it to your needs, you will have to very clearly understand how it works.

For example:

Format of paged data from UT 11.1.9.56



The format of the downloaded data from UT 11.1.9.56 using the module from Bitrix:



That is, we have inconsistencies in the formats of unloading from 1C and Bitrix for the same version of the platform and configuration.

The interaction of 1C and 1C-Bitrix products is based on bidirectional data exchange procedures. The data is exchanged using an XML-based open Business Information Exchange Standard - CommerceML 2.0.

If you read what CommerceML 2.0 is, you are just like me, marvel at how complicated this standard is compared to others. Even a simple description, i.e. The description schema file in txt format takes 107 kilobytes!

And any of your mistakes, most likely, will end in that the exchange stops working altogether.

When using the standard exchange, you are forced to “push down” both yourself and the client on constant monitoring of changes that occur both on the 1C side and on the Bitrix side. With each update, you risk losing all the changes you made to the exchange. As a result, you will get a complex, very “buggy” mechanism that works almost independently of you. And if we add to this the constant updates of 1C and Bitrix, then instead of a working exchange you will have a constant “headache”.

How to do the integration?


I have already given this advice and will give one more time: the exchange must be written by myself. In addition to integration mechanisms, you may have another problem: the module itself relies on data filled in a certain way. And these rules are also subject to change and change regularly.

So, in the process of “fighting with updates”, you coped with the platform, with the module, and then come across an error that comes from the wrong data format. It turns out that they also need to be filled in a certain, and implicit way. Remember how in my example I pointed out the need to put a “tick” on the side of 1C Beatrix, which I, fortunately, knew about. Otherwise, the time to work on setting up the exchange would be even longer. And nowhere in the documentation about this most "tick" does not say a word!

In principle, if you use a standard exchange, then you should listen to what 1C Bitrix itself says in the words of the administrator:
- do not update (while 1c says - update)


If you want to use a typical module, the sequence of your actions should be the following:
  1. Checked the version of the platform
  2. Check configuration version
  3. Check the version of the module.
  4. We checked all the databases, made sure that the data was picked up.
  5. Checked the compliance of versions 1C Bitrix and software 1C.
  6. Check the integrity of the database, if they are file.

Most likely, in the course of performance of these actions the error will be found. In addition, it is very important to remember:
Do not modify the standard exchange.

For any attempts to refine the standard exchange, you face a huge number of problems in the future, with the need to study each update of the exchange module, and each time bring your improvements to the new version again.

As you can see, the integration of 1C software and Bitrix sites is a rather complicated task that requires attention, most often, experience, and even it does not always help. Unfortunately, help on new bugs that are fairly stable in return for the old ones can only be found on forums. It is for this reason that I prefer to write the exchange myself. But if the need arises, then there will be a solution (I hope).

Source: https://habr.com/ru/post/246429/


All Articles