Hello GoogleAds,
I have a weird problem, similar to
this, where the following code
$sitelinkResourceNames = [
// resource names of extension feed items containing sitelinks successfully fetched from the API
];
$sitelinks = [];
foreach ($sitelinkResourceNames as $sitelinkResourceName) {
$sitelinks[] = new StringValue(['value' => $sitelinkResourceName]);
}
$resource_name = 'RESOURCE_NAME_OF_CUSTOMER_EXTENSION_SETTING';
$customerExtensionSetting = new CustomerExtensionSetting([
'resource_name' => $resource_name,
'extension_feed_items' => $sitelinks,
]);
$customerExtensionSettingOperation = new CustomerExtensionSettingOperation();
$customerExtensionSettingOperation->setUpdate($customerExtensionSetting);
$customerExtensionSettingOperation->setUpdateMask(FieldMasks::allSetFieldsOf($customerExtensionSetting));
$extensionFeedItemOperations[] = $customerExtensionSettingOperation;
will work on my local development server (PHP 7.3.1) but on my production server (PHP 7.2.19) will return the following error:
"extensionSettingError": "EXTENSION_SETTING_UPDATE_IS_A_NOOP".
"message": "The UPDATE operation does not specify any fields other than the resource name in the update mask.",
Investigating FieldMasks::allSetFieldsOf($customerExtensionSetting) shows me that while the test environment
returns 'resource_name' and 'extension_feed_items' as expected, the production environment creates
just the 'resource_name' field, ignoring my 'extension_feed_items' completely. I have tried re-setting my extension_feed_items it in a different line like so:
$customerExtensionSetting->setExtensionFeedItems($sitelinks);
but that did not work either. Again, it is all working as expected on my development VM, using the latest API library.
Thanks in advance,
Andreas