Fresh installed magento 2.3 with sample data showing blank front page

Running mode: developer I was getting blank frontend page. I checked system.log and debug.log in magento and found out there was some errors related to some broken reference.

main.INFO: Broken reference: the 'logger' element cannot be added as child to 'after.body.start', because the latter doesn't exist [] [] main.INFO: Broken reference: the 'theme.active.editor' element cannot be added as child to 'after.body.start', because the latter doesn't exist [] [] 

The frontend page was showing blank but it was actually loading some html. I check for solution and found an answer in this thread https://stackoverflow.com/questions/55928892/magento-2-blank-page-but-not-empty

This thread suggested to delete the global.php file located in generated/metadata, and following this solved my issue and front end of my website loaded properly.

But now whenever I run the command

php bin/magento setup:di:compile 

the global.php file is generated again and my website’s frontend shows blank page again and deleting global.php solves it. I got some information related to global.php file in this thread Purpose of magento\generated\metadata\global.php file and is it safe to delete this file?

According to above thread

“The code compiler creates generated/metadata/global.php, which is a PHP serialized map of all constructor definitions mixed with object linking configuration defined in di.xml. di.xml is the dependency injection configuration. There is a global app/etc/di.xml and there can one defined for every module .”

This also happens when I run my website in production mode, and deleting global.php solves it. Now my question is why magento is generating global.php file if it is neither using it in developer mode nor production mode as deleting this file does not give any error and the website works perfectly.

And also broken reference error in fresh install of magento, does it means that it is some bug related to magento and how can one debug this problem further. I am asking how to debug it because as we can see in the error there is no mention of any file just a reference ‘after.body.start’.

M2: flushing cache lets page render one time, then blank white page thereafter

I’m working through Alan Storm’s ‘No Frills Magento 2 Layout’ an internal dev server. He walks the reader through small edit, refresh, another small edit, refresh, see what changes, and so on. There are lots of examples. Then I inserted a typo which I couldn’t find, that ended up being whitespace added at the end of 'Magento\Framework\View\Element\Template ' when I copied and paste from the PDF manual.

I then sorted out getting errors enabled, however I managed to get the Magento 2.3.2 install into a bad state where there are white pages on every refresh. Clean the cache and hit F5, the site comes back, but for only one render.

This was a fresh install and I had only executed php bin/magento deploy:mode:set developer as per the install instructions for the module which is part of the book.

I then started an exploration of every command available from the internet in an attempt to be able to hit F5 and just get a page to reload. I issued these two commands:

php bin/magento deploy:mode:set developer php bin/magento cache:disable 

And now the site will refresh with F5 but instead of quickly refreshing, the server grinds for 7 to 10 seconds and then renders Hello World

What mechanism in Magento 2 causes this?
and
What can a person do to get back to how the site was working as expected before all this?

Right now, I believe the solution is to move this M2 and start over by installing a new fresh instance. But that simply is not acceptable; what happens if a live site starts acting like this? Having to clean cache to render one page is not acceptable nor is disabling cache…

Why is CDE only loading a blank screen for all of my .XML descriptors?

Any time I try to use the Component Descriptor Editor to view a descriptor file, I get a blank page instead of the UI.

I tried uninstalling/re-installing the Workbench. I also updated all of my UIMA software to the current versions (except UIMAfit, still at 2.4.0).

The screen is blank, gray background. The tab text is also empty. I can open the files with the XML or text editors.

Post filtering is returning blank page

I embedded some code to generate post filters referencing an article at https://premium.wpmudev.org/blog/add-post-filters/ as displayed below:

<form class='post-filters'> <select name="orderby"> <?php   $  orderby_options = array(     'post_date' => 'Order By Date',     'post_title' => 'Order By Title',     'rand' => 'Random Order',   );   foreach( $  orderby_options as $  value => $  label ) {     echo "<option ".selected( $  _GET['orderby'], $  value )."      value='$  value'>$  label</option>";   } ?> 

‘Descending’, ‘ASC’ => ‘Ascending’, ); foreach( $ order_options as $ value => $ label ) { echo “$ label”; } ?>

Consequently, the page the same code is embedded only returns a blank page showing no code in the source view. I also used Search & Filter plugin only to get the same blank page.

I cannot resolve this issue alone. Please someone help me correct the code.

Magento 2 Blank Layout Page

I tried to create a new tab in customer edit backend.

First i create the app/code/Namespace/Point/view/adminhtml/layout/customer_index_edit.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">     <body>            <referenceBlock name="customer_form">              <block class="Namespace\Point\Block\Adminhtml\Edit\Tab\CustomerPoint" name="customer_edit_tab_customerpoint" >               <action method="setTabLabel">                   <argument name="label" xsi:type="string">Namespace Point</argument>               </action>             </block>           </referenceBlock>     </body> </page> 

then i create the block:

app/code/Namespace/Point/Block/Adminhtml/Edit/Tab/CustomerPoint.php

namespace Namespace\Point\Block\Adminhtml\Edit\Tab; use Magento\Customer\Controller\RegistryConstants; use Magento\Ui\Component\Layout\Tabs\TabInterface;  class CustomerPoint extends \Magento\Framework\View\Element\Template implements TabInterface {      protected $  _coreRegistry;       public function __construct(         \Magento\Backend\Block\Template\Context $  context,         \Magento\Framework\Registry $  registry,         array $  data = []     ) {         $  this->_coreRegistry = $  registry;         parent::__construct($  context, $  data);     }      public function getCustomerId()     {         return $  this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);     }      public function getTabLabel()     {         return __("Namespace Point");     }      public function getTabTitle()     {         return __('Namespace Point');     }      public function canShowTab()     {         if ($  this->getCustomerId()) {             return true;         }         return false;     }      public function isHidden()     {         if ($  this->getCustomerId()) {             return false;         }         return true;     }      public function getTabClass()     {         return '';     }      public function getTabUrl()     {       return $  this->getUrl('namespace_point/customerpoint/tab', ['customer_id'=>$  this->getCustomerId(),'_current' => true]);     }      public function isAjaxLoaded()     {         return true;     } } 

at this point the tab is showing in customer edit admin. Then i create the route app/code/Namespace/Point/etc/adminhtml/routes.xml

<?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">     <router id="admin">         <route frontName="namespace_point" id="namespace_point">             <module before="Magento_Backend" name="Namespace_Point"/>         </route>     </router> </config> 

then the controller app/code/Namespace/Point/Controller/Adminhtml/Customerpoint/Tab.php

namespace Namespace\Point\Controller\Adminhtml\CustomerPoint;  class Tab extends \Magento\Customer\Controller\Adminhtml\Index {      public function execute()     {       $  this->initCurrentCustomer();       $  resultLayout = $  this->resultLayoutFactory->create();       return $  resultLayout;     } } 

then i create layout for this controller layout app/code/Namespace/Point/view/adminhtml/layout/namespace_point_customerpoint_tab.xml

<?xml version="1.0"?> <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">     <container name="root" label="Root">         <block class="Namespace\Point\Block\Adminhtml\Edit\Tab\CustomerPoint" name="point.edit.tab.customerpoint"  template="Namespace_Point::customer_point_tab.phtml" cacheable="false"/>      </container> </layout> 

and finally the templates file app/code/Namespace/Point/view/adminhtml/templates/customer_point_tab.phtml

<h1> POINT </h1> 

but when i click the new customer tab, it gives me blank page, when i use the tab url in my browser, it gives me blank page too, when i add die('test'); at the controller it prints test but when i add die('test'); in the block constructor it gives blank page, seems like the controller doesn’t read the xml layout file to generate

Blank screen on second run (after closing)

Running Ubuntu 18.04 in Windows 10 (WSL1). On a fresh boot, I can run bash without a problem, even in multiple windows/instances. Once I close out bash, then go to re-open, I get a blank screen/terminal. If the window is selected, it will show a blinking cursor, but that’s it.

Tried removing & reinstalling from the Microsoft Store, but that doesn’t fix it. Rebooting the host machine will allow bash to run again, but it will fail under the same circumstances. Attempting to stop LxssManager doesn’t work, as it seems to stall at “stopping.”

cart/checkout blank in Magento 2.2.8

Issue

Cart/Checkout is showing blank when I add a product to cart after upgrading to Magento 2.2.8.

Server Error

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function getFinalProduct() on null in /var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/DefaultItem.php:129\nStack trace:\n#0  /var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/app/code/MGS/Mpanel/CustomerData/DefaultItem.php(81): Magento\Checkout\CustomerData\DefaultItem->getProductForThumbnail()\n#1  /var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/AbstractItem.php(31): MGS\Mpanel\CustomerData\DefaultItem->doGetItemData()\n#2  /var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/ItemPool.php(63): Magento\Checkout\CustomerData\AbstractItem->getItemData(Object(Magento\Quote\Model\Quote\Item\Interceptor))\n#3  /var/www/vhosts/mywebsite.co.uk/staging.mywebsite.co.uk/vendor/magento/module-checkout/CustomerData/Cart.php(166): Magento\C...\n', referer: https://staging.mywebsite.co.uk/baseball-cap.html 

Can anyone please suggest a solution?