2

After enabling the module created, browsing back to the page gives me blank page instead. Viewing the source of the page gives me basic html tags.

public view

view source

3
  • enable developer more or check the log Commented May 29, 2019 at 6:23
  • remove # from app/bootstrap.php ini_set('display_errors', 1); and check for the error on frontend.
    – Saphal Jha
    Commented May 29, 2019 at 7:02
  • thanks, but I'm still unable to display the error message.possible that html tags/php loads properly. I think we need to check out the modules.
    – MCaneda
    Commented May 31, 2019 at 1:43

1 Answer 1

0

Assuming you are using XAMPP, first, change localhost to 127.0.0.1 or your unit IP address

If in case the admin panel is not accessible, you can go to your database and go to core_config_data table, then locate web/secure/base_url and web/unsecure/base_url and change value of localhost from there.

If you face an error after the changes above:

You can try editing the Validator file from vendor folder with namespace

Magento\Framework\View\Element\Template\File

At around line 138 replace the code with this one

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

save then cache:flush

4
  • have tried your resolution thru database replacement but it caused the site for too many redirections. and for the vendor folder, I've replaced with this code after I did the installation.
    – MCaneda
    Commented May 29, 2019 at 8:10
  • did you got any errors in your browser's network tab?
    – fmsthird
    Commented May 29, 2019 at 10:16
  • it loads without an error from behind. there's no issue with the custom module but when it was enabled, I can only see a blank page.
    – MCaneda
    Commented May 31, 2019 at 1:41
  • you can try to debug it by enabling developer mode in Magento 2. or you can also open index.php inside your magento root directory then add error_reporting(E_ALL); ini_set('display_errors', 1); or other way is to go to pub/errors directory and rename local.xml.sample file to local.xml then refresh the page to see the errors
    – fmsthird
    Commented May 31, 2019 at 3:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.