A
A
Andrew2021-07-16 17:28:13
1C-Bitrix
Andrew, 2021-07-16 17:28:13

Why are PICTUREs not saved in Bitrix?

Images are not saved for categories and elements, there is even a property of the file type - it is not saved here either.
How it manifests itself: go to the admin panel and open the element for editing, upload the announcement image (for example) it shows that the image has loaded, even the preview of the image appears, click "Note", the page is refreshed and empty!
In the infoblock that was installed as a demo, there is no such trouble, hosting and global site settings disappear.
In my problematic infoblock, I parsed categories and products and added them as standard - new CIBlockSection add
The file is not physically loaded into the uploads folder for some reason, but is loaded from the infoblock demo.
No errors are thrown.
Something went wrong? Who stepped on a similar rake?
The problem is probably in the import, I missed some action.
If I create a new element by hand - everything is fine.

$bs = new CIBlockSection;
    $arFields = [
        "ACTIVE" => 'Y', "IBLOCK_ID" => 13,
        "NAME" => $value['name'], "SORT" => $value['por'],
        'CODE' => CUtil::translit($value['name'], "ru", $arTransParams),
        'UF_OLD_ID' => $value['id'], 'UF_OLD_PARENT' => $value['parent'],
    ];
    if ($sectParentRes) {
        $arFields['IBLOCK_SECTION_ID'] = $sectParentRes->fields['ID'];
    }
 $bs->Update($sectRes->fields['ID'], $arFields);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2021-10-04
@rabamaster

Thanks, there were no write permissions in the uploads / iblock / *** folder - I didn’t notice right away, I looked only at the root level. The whole trouble is that the import was launched from root, and the site is spinning from bitrix

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question