🇮🇳India @sj_baradia

Account created on 25 August 2023, over 1 year ago
#

Recent comments

🇮🇳India sj_baradia

Hi @anybody, we can use \Drupal::service ('extension.list.module')->getPath('my_markdown_module)to get the relative path of the module.

We can define it at the top of the php file or globally to use it according to our need.

🇮🇳India sj_baradia

Hi @coaston,
I found the same error when used layout builder with abc theme. The reason behind that is the $region variable is used in_array is an array and the variable $region is not being accessible outside the if condition. That's why I declare it in the top as an array.

This error may occur in some machine and in some machine may not. But it is good way to describe the variable at the top of the function.

🇮🇳India sj_baradia

Hi @coaston,
I found the same error when used layout builder with abc theme. The reason behind that is the $region variable is used in_array is an array and the variable $region is not being accessible outside the if condition. That's why I declare it in the top as an array.

This error may occur in some machine and in some machine may not. But it is good way to describe the variable at the top of the function.

🇮🇳India sj_baradia

Hi @coaston, I encountered same issue when enabled theme with layout builder. I looked for this error in .theme file and found that the in_array function looks for array and it has to define above so all the variables can access it. This is something that may or may not be in all cases that you have to define them at the top insde the function.

Sometimes when defining inside it takes it as non-array variable. To solve this issue, I have created the patch file for it.

Please review and verify it.

Production build 0.71.5 2024