Home Page Not Loading
Permalink
Hello, I need urgent help. I made a "Advanced Block" edit to a YouTube video embed and simply added "?rel=0" to the end of the YouTube "source=" url and saved block. Now I can't log in or anything. Need help please. Alright so I can login, however I cannot edit the Home page any more. All the sub-pages are accessible and editable but for some reason the Home page (most important) is not. I'm not sure what changed and can I view code changes outside the Concrete 5 interface. Example, I made edits to an Advanced HTML Block through the Concrete 5 Block interface, can I access these code changes outside the block element as I can't see the blocks anymore to edit them? Hope this makes sense.
Below is the file where the error is being thrown. D:\ENT\mbimedia\concrete\src\Editor\LinkAbstractor.php I'm not sure why it's working on all other pages but not the home.
Below is where the issue is, PLEASE HELP!
I would love it if someone can take a cursory look at the site to see if it's a simple fix or not. The site URL ishttp://www.mbimedia.com. As you'll see the home page doesn't seem to work anymore. All the sub-pages however do, Example "www.mbimedia.com/index.php/projects".
Below is the last entry from the Reports Log.
Jan 22, 2020, 10:49:10 PM Exceptions rgarcia Exception Occurred: D:\ENT\mbimedia\concrete\src\Editor\LinkAbstractor.php:181 Call to a member function getURL() on null (1)
Below is the file where the error is being thrown. D:\ENT\mbimedia\concrete\src\Editor\LinkAbstractor.php I'm not sure why it's working on all other pages but not the home.
Below is where the issue is, PLEASE HELP!
// now we add in support for the links $text = preg_replace_callback( '/{CCM:FID_([0-9]+)}/i', function ($matches) { $fID = $matches[1]; if ($fID > 0) { $f = File::getByID($fID); return $f->getURL(); } },
I would love it if someone can take a cursory look at the site to see if it's a simple fix or not. The site URL ishttp://www.mbimedia.com. As you'll see the home page doesn't seem to work anymore. All the sub-pages however do, Example "www.mbimedia.com/index.php/projects".
Below is the last entry from the Reports Log.
Jan 22, 2020, 10:49:10 PM Exceptions rgarcia Exception Occurred: D:\ENT\mbimedia\concrete\src\Editor\LinkAbstractor.php:181 Call to a member function getURL() on null (1)
you can go to your dashboard Stacks and Blocks area > Block Types and delete the block that is causing trouble and delete it. This will fix your immediate problem. To reinstall it Ill need someone else to answer that.
you could also go to your sitemap and roll the version back from there. Easier I should think.
DO what the say above to clear the issue. then look to fix it.
It looks to me link you have two things going on.
I am not sure if you have closed the
$text = preg_replace_callback(
I would var_dump($f) and then look at at what this is pulling up.
looking at this page it looks like you are missing a /
$f = \File::getByID(1);
https://documentation.concrete5.org/developers/working-with-files-an...
I would try testing this on one file first to make sure your if statment is pulling in somehting, so go find an file and add its id into you code, in this case the id was 32
$f = \File::getByID(32);
then echo out the result "echo $f->getURL();"
Simplify the code then build it up step by step will help you see the errors.
It looks to me link you have two things going on.
I am not sure if you have closed the
$text = preg_replace_callback(
I would var_dump($f) and then look at at what this is pulling up.
looking at this page it looks like you are missing a /
$f = \File::getByID(1);
https://documentation.concrete5.org/developers/working-with-files-an...
I would try testing this on one file first to make sure your if statment is pulling in somehting, so go find an file and add its id into you code, in this case the id was 32
$f = \File::getByID(32);
then echo out the result "echo $f->getURL();"
Simplify the code then build it up step by step will help you see the errors.