I only want 2 columns on the page, so I have assigned all blocks to sidebar one & two (16 column fixed grid [960px] - Theme Default) and assigned 8 columns for each one of them.

I get the this error:

Warning: Division by zero in fusion_core_grid_info() (line 392 of /usr/home/xyz/www/sites/all/themes/fusion/fusion_core/template.php).

CommentFileSizeAuthor
#3 1246916-fusion-division-by-zero.patch1.14 KBrickvug
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pancrilio’s picture

Title: When » Division by zero in fusion_core_grid_info()
sheena_d’s picture

Status: Active » Closed (works as designed)

This is problematic, because the "content" region is assumed to always be present, whether or not you place any blocks into it, and the content region receives a grid width value equal to the total grid width (16) minus the first sidebar width(8) and the second sidebar width (8). So, essentially you are giving the content region a grid width of 0, which is not allowed.

Move your blocks from one of the sidebars into the Content region. This should fix the issue and still give you the result you are looking for.

rickvug’s picture

Version: 7.x-1.0-alpha2 » 7.x-1.x-dev
Component: Miscellaneous » Code
Status: Closed (works as designed) » Needs review
FileSize
1.14 KB

I also experienced this issue. In my case it is not related to the content region as the block has been properly placed in the content region. The following patch adds an extra check to avoid a division by zero error. The root problem could be something else but I didn't have the time to research Fusion's internals to understand all that is going on. Review by a fusion maintainer or frequent contributor would be appreciated.

rickvug’s picture

Note that the cause of my error was not having the theme settings properly defined in my base theme. Adding default theme settings fixed the issue.

Poieo’s picture

Issue summary: View changes
Status: Needs review » Closed (works as designed)