0

We face a issue with our Magento 2.3.4, we got a blank page error when we visit the frontend.

Already enabled ini_set('display_errors', 1); but still no error is displayed.

We got a debug.log file with the following errors:

[2020-03-17 10:33:01] main.INFO: Broken reference: the '' element cannot be added as child to '', because the latter doesn't exist [] []

I already tried to remove all cache etc, but I can not find and solve this issue.

Any idea how to solve this?

JGeer
  • 1,418
  • 11
  • 59
  • 122
  • you remove this file pub/generated/metadata/global.php and run php bin/magento setup:static-content:deploy the – Mohit Patel Mar 17 '20 at 11:38
  • @MohitPatel Thanks! I tried this, but that does not seems to work. But the issue is related to the compile. – JGeer Mar 17 '20 at 12:36
  • i think this problem pls try this links :- https://magento.stackexchange.com/questions/252188/magento-2-2-7-admin-panel-blank-page – Mohit Patel Mar 17 '20 at 12:39
  • @MohitPatel Thanks! But we already run 2.3.4. for a while without a problem. This seems to be related to 2.3.3. Are you sure this edit is still necessary? – JGeer Mar 17 '20 at 12:42
  • Please try this above link but i am noy sure but you are try . may be complete the issues. – Mohit Patel Mar 17 '20 at 12:51
  • @MohitPatel Thanks! I tried this, but it did not work, same issue. – JGeer Mar 17 '20 at 13:24
  • you should start disabling third party modules there is a good chance the problem is being caused by a module. I also found a similar problem being caused by enabling the move js code to bottom of page option. – paj Mar 17 '20 at 21:50
  • @paj Thanks! That's what I also thought, but that did not work. I disabled all modules and still faces the same issue. I can not really understand why Magento is not displaying any error to solve the issue. – JGeer Mar 18 '20 at 08:18
  • try this awesome solution, it always works for me... https://magento.stackexchange.com/a/318528 – Harsh Patel Jul 03 '21 at 11:42

3 Answers3

1

Try to debug in this class and see what elements it is referencing and then find those in your XML files - vendor/magento/framework/View/Layout/ScheduledStructure/Helper.php:184

Arif Ahmad
  • 429
  • 2
  • 5
  • Thanks! But how should we debug this and what should we change in this case? – JGeer Mar 17 '20 at 13:08
  • Put a xdebug breakpoint if you already have that setup. If not then try doing error_log(); or do echo; die; for the values - $structure, $key, $type, $parentName . $alias – Arif Ahmad Mar 18 '20 at 06:37
0

Try this

app/bootstrap.php

Replace #ini_set('display_errors', 1); To ini_set('display_errors', 1);

Sanket Makavana
  • 340
  • 2
  • 15
0

try this awesome solution. it works for me... https://magento.stackexchange.com/a/318528

in this solution, we need to change only one line in "Validator.php" file which is located at vendor\magento\framework\View\Element\Template\File\Validator.php

find the function which named "protected function isPathInDirectories($path, $directories)"

inside this function you will see following line...

$realPath = $this->fileDriver->getRealPath($path);

you have to replace this line with below following line

$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));

Original Answer you will see at : https://magento.stackexchange.com/a/318528

Post Credit :- Sushant Vishwas

Harsh Patel
  • 219
  • 1
  • 10