cancel
Showing results for 
Search instead for 
Did you mean: 

element 'topic' attribute 'is synchronous' the attribute 'is synchronous' is not allowed

element 'topic' attribute 'is synchronous' the attribute 'is synchronous' is not allowed

Good morning.

I am stuck in an unbelievable situation where the Theme developer and the extension developer are pointing at each other and both of them keep on on the hook.

There is a conflict as shown below:

https://drive.google.com/file/d/1gOoTAzLBuvEjx5pmFFWZUEj-t7oa4icd/view

The extension developer says the issue is with the theme and ask me to contact the theme developer. The Theme developer says that he does not support extension conflict and turn me down. I am in the middle and no one is helping.

Can someone tell me exactly what it is and how can this be fixed?

Thanks 

Pascal

6 REPLIES 6

Re: element 'topic' attribute 'is synchronous' the attribute 'is synchronous' is not allowed

Hello @pascal_martin 

 

Please try one of the below solutions:

(Recommended) Method 1:

  1. Login to SSH
  2. Go to Magento Root directory
  3. Enter the following command : grep -rnw app/ -e 'is_synchronous'
  4. Here, this command will return the full path of the file where is_synchronous is used.

Note: In the above steps, you can also try another directory such as vendor instead of app

 

Method 2:

  1. Open vendor\magento\framework\Config\Reader\Filesystem.php file
  2. Go to read function
  3. Print debug log $fileList object value
  4. It will return the numbers of files which is current url

Hope one of the above methods helps.

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution"

Re: element 'topic' attribute 'is synchronous' the attribute 'is synchronous' is not allowed

Hi Meetanshi,

Thanks for the quick feedback, but this is a bit too technical for me.

Here below the copy of the file $fileList, that will speak better to you than to me, not sure what to do next.

Regards,
pascal

/**
* Load configuration scope
*
* @param string|null $scope
* @return array
*/
public function read($scope = null)
{
$scope = $scope ?: $this->_defaultScope;
$fileList = $this->_fileResolver->get($this->_fileName, $scope);
if (!count($fileList)) {
return [];
}
$output = $this->_readFiles($fileList);

return $output;
}

/**
* Read configuration files
*
* @param array $fileList
* @return array
* @throws \Magento\Framework\Exception\LocalizedException
*/
protected function _readFiles($fileList)
{
/** @var \Magento\Framework\Config\Dom $configMerger */
$configMerger = null;
foreach ($fileList as $key => $content) {
try {
if (!$configMerger) {
$configMerger = $this->_createConfigMerger($this->_domDocumentClass, $content);
} else {
$configMerger->merge($content);
}
} catch (\Magento\Framework\Config\Dom\ValidationException $e) {
throw new \Magento\Framework\Exception\LocalizedException(
new \Magento\Framework\Phrase(
'The XML in file "%1" is invalid:' . "\n%2\nVerify the XML and try again.",
[$key, $e->getMessage()]
)
);
}
}
if ($this->validationState->isValidationRequired()) {
$errors = [];
if ($configMerger && !$configMerger->validate($this->_schemaFile, $errors)) {
$message = "Invalid Document \n";
throw new \Magento\Framework\Exception\LocalizedException(
new \Magento\Framework\Phrase($message . implode("\n", $errors))
);
}
}

$output = [];
if ($configMerger) {
$output = $this->_converter->convert($configMerger->getDom());
}
return $output;
}

/**
* Return newly created instance of a config merger
*
* @param string $mergerClass
* @param string $initialContents
* @return \Magento\Framework\Config\Dom
* @throws \UnexpectedValueException
*/
protected function _createConfigMerger($mergerClass, $initialContents)
{
$result = new $mergerClass(
$initialContents,
$this->validationState,
$this->_idAttributes,
null,
$this->_perFileSchema
);
if (!$result instanceof \Magento\Framework\Config\Dom) {
throw new \UnexpectedValueException(
"Instance of the DOM config merger is expected, got {$mergerClass} instead."
);
}
return $result;
}
}

 

Re: element 'topic' attribute 'is synchronous' the attribute 'is synchronous' is not allowed

Hey, @pascal_martin again,

 

Please add following line after $fileList = $this->_fileResolver->get($this->_fileName, $scope);

\Magento\Framework\App\ObjectManager::getInstance()->get('Psr\Log\LoggerInterface')->info(print_r($fileList,true));

And, find system.log in var/log folder.

Hope it helps.

 

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution"

Re: element 'topic' attribute 'is synchronous' the attribute 'is synchronous' is not allowed

Hi Meetanshi,

 

I added the line to the file as following:

public function read($scope = null)
{
$scope = $scope ?: $this->_defaultScope;
$fileList = $this->_fileResolver->get($this->_fileName, $scope);
\Magento\Framework\App\ObjectManager::getInstance()->get('Psr\Log\LoggerInterface')->info(print_r($releasesArray,true));
if (!count($fileList)) {
return [];
}
$output = $this->_readFiles($fileList);

return $output;
}

 

But the website couldn't be loaded, the browser couldn't find the page.

In var/log there is no system.log but only syslog and syslog.1

Best regards,

Pascal

 

 

Re: element 'topic' attribute 'is synchronous' the attribute 'is synchronous' is not allowed

Hi,

So far the solution is not working, would you have another solution to offer?

Thanks,

 

Re: element 'topic' attribute 'is synchronous' the attribute 'is synchronous' is not allowed

Hi @pascal_martin ,

I faced the same issue with fresh magento 2.3.0 installation few days back. While looking into it, i found that following file has used is_synchronous attribute in xml.

 

vendor/magento/module-inventory-catalog/etc/communication.xml

So i have removed is_synchronous="false" from that particular file temporarily to check if that resolves the issue. I found 3 occurrences in the same file which i have removed and cleared cache and run setup:upgrade command and it worked. 

 

This was just a workaround and not a final solution but you can make your website working by applying this change.

 

Try if that helps.