P
P
photosho2021-07-27 18:02:24
1C-Bitrix
photosho, 2021-07-27 18:02:24

Why is DETAIL_PICTURE not being updated in update()?

I'm trying to update the "DETAIL_PICTURE" field of the infoblock element:

$el->update(1123, ['DETAIL_PICTURE' => CFile::getFileArray($pic)]);


1. The "$pic" variable contains the ID of the image
2. The "getFileArray()" method returns the correct array
3. The "update()" method returns "true"
4. The "LAST_ERROR" property is empty
5. There are no handlers for the "elementUpdate" event

Image is not is being updated. If the same code is used to update another field, for example, "NAME", then everything works fine. What can be wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kedavr13, 2021-07-28
@photosho

Try the makeFileArray function

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question