Troubleshoot blank screen "content block" editing error

Permalink
When I press edit (or add new) on a content block, the entire screen goes blank. It's like the popup is just a little broken, as the source still shows the page content.

It's not a internal C5 error, as it happens on a fresh install on the same server.

I'd love any help narrowing it down to what the problem could be.

Thanks!

razorfrog
 
razorfrog replied on at Permalink Reply
razorfrog
No ideas? Sadness. The Firefox Error console shows two errors when I try to edit a content block:

Error: _gat is not defined
Error: tinyMCE is not defined

Seems a little similar to these problems:
http://www.concrete5.org/index.php?cID=23132...
http://www.concrete5.org/index.php?cID=21733....

Happens in every browser on mac and PC except IE.
guitarmy replied on at Permalink Reply
I am having the exact same issue. Any ideas?
razorfrog replied on at Permalink Reply
razorfrog
Turned out it was JQuery being called twice. I had a custom 404 page which was being called for a non-existant JS file, and that in turn called the header all over again.

Hope that helps!
guitarmy replied on at Permalink Reply
Hmm. I am JUST getting into concrete5 and all I have in my theme is a default.php file. I double-checked my code & there is 0 jquery or javascript calls in the head of the default.php.

I'm at a total loss as to what to do.

I should mention Firefox's Errors show that jQuery is not defined as well as a ton of "tinymce is not defined" errors.
guitarmy replied on at Permalink Reply
This was my fix, thanks to a post in the Bugs section. Turns out there was a problem in the urls.php file.

Take the code that starts with this:

/** 
    * Gets a full URL to the directory containing all of a block's items, including JavaScript, tools, icons, etc...
    * @param BlockType $bt
    * @return string $url
    */


...all the way down to this :

return $url; 
       }


And replace it with this:

/** 
    * Gets a full URL to the directory containing all of a block's items, including JavaScript, tools, icons, etc...
    * @param BlockType $bt
    * @return string $url
    */
   public function getBlockTypeAssetsURL($bt, $file = false) { 
           $url = ""; 
           $ff = ''; 
           if ($file != false) { 
               $ff = '/' . $file; 
           } 
           if ($bt->getPackageID() > 0) { 
               $db = Loader::db(); 
               $h = $bt->getPackageHandle(); 
               $url = (is_dir(DIR_PACKAGES . '/' . $h)) ? BASE_URL . DIR_REL : ASSETS_URL;