Hi guys,

I am not sure if this is the correct place to post this so please forgive me if this is an issue that needs to be fixed by Fusion Mobile.

When using Fusion Mobile I am seeing 7 notices appear in the logs for each page view. Below are the 3 unique errors

Notice: Undefined index: sidebar_first in fusion_core_grid_info() (line 392 of sites/all/themes/fusion/fusion_core/template.php).
Notice: Undefined index: sidebar_second in fusion_core_grid_info() (line 392 of /sites/all/themes/fusion/fusion_core/template.php).
Notice: Undefined index: sidebar_second in fusion_core_grid_info() (line 394 of /sites/all/themes/fusion/fusion_core/template.php).
Notice: Undefined index: sidebar_first in fusion_core_preprocess_page() (line 100 of /sites/all/themes/fusion/fusion_core/template.php).
Notice: Undefined index: sidebar_second in fusion_core_preprocess_page() (line 100 of /sites/all/themes/fusion/fusion_core/template.php).

Obviously these functions are referring to regions that don't exist in Fusion Mobile.

Is this a problem with how Fusion Mobile is letting Fusion Core know what regions it has, or is this an issue with Fusion Core assuming that all sub-themes will have these regions?

Comments

aquariumtap’s picture

Assigned: Unassigned » stephthegeek

@akoepke - currently sidebar regions are required by Fusion, but I see that those regions are not in use by the fusion mobile theme. Let me find out more information about this...

@stephthegeek - sidebar regions are part of the grid calculations. I could make those regions optional and make any calculated template variables related to sidebar or group widths = 0... what do you think? there are also theme settings that assume those regions are present.

stephthegeek’s picture

@aquariumtap: I'm not sure how the technical implementation would work but yeah this is an open question for fusion_mobile. I think it needs to become optional one way or another.

aquariumtap’s picture

Title: Undefined index sidebar_second appearing when using fusion_mobile » Make sidebar_first and sidebar_second optional regions
Assigned: stephthegeek » aquariumtap
Category: bug » feature

okay. I agree. It's come up in other issues as well.

akoepke’s picture

Thanks for working together for a solution guys :)

dddave’s picture

sub

hwasem’s picture

subscribe.

thomsol’s picture

subscribe

destlund’s picture

subscribing

Webbeh’s picture

Subscribing, as I am running into this issue as well.

imoreno’s picture

Subscribing

aquariumtap’s picture

Status: Active » Needs review

In my opinion, Fusion isn't the best choice for a theme without sidebars. But if you want to tweak an existing theme, for example, you need to remove all mention of sidebar_first and sidebar_second in the bottom part of the theme's .info file, where "grid adjusted regions", "grid adjusted groups" and "grid adjusted groups fluid" are defined.

If you don't have any sidebars, you can probably just replace this:

; --------------------------------------------------------------------------------
; Some regions receive grid unit assignments automatically based on the size
; of adjacent regions.  For example, the content region will be adjusted to 
; be the total grid width less the width of both sidebars.  The assignments
; below are used by the grid calculator to do that simple math.
; --------------------------------------------------------------------------------
settings[grid_adjusted_regions][preface_bottom][] = sidebar_first
settings[grid_adjusted_regions][help][] = sidebar_first
settings[grid_adjusted_regions][help][] = sidebar_second
settings[grid_adjusted_regions][content][] = sidebar_first
settings[grid_adjusted_regions][content][] = sidebar_second
settings[grid_adjusted_regions][node_top][] = sidebar_first
settings[grid_adjusted_regions][node_top][] = sidebar_second
settings[grid_adjusted_regions][node_bottom][] = sidebar_first
settings[grid_adjusted_regions][node_bottom][] = sidebar_second
settings[grid_adjusted_regions][postscript_top][] = sidebar_first

; --------------------------------------------------------------------------------
; A group contains one or more regions.  An adjusted group will be assigned 
; grid units based on the width of other regions.  The layout is defined below to 
; allow for that calculation.
; --------------------------------------------------------------------------------
settings[grid_adjusted_groups][main_group][] = sidebar_first
settings[grid_adjusted_groups][content_group][] = sidebar_first
settings[grid_adjusted_groups][content_group][] = sidebar_second

; --------------------------------------------------------------------------------
; Fluid layouts are based on percentages.  A width percentage is always relative
; to its containing element.  In order for a grid assignment to represent the same
; rendered width across different levels in the layout heirarchy, it's necessary
; to make adjustments to percentages.  To do this, Fusion needs to understand
; how regions relate with one another.
; --------------------------------------------------------------------------------
; Regions outside a parent group to subtractto get correct parent width
settings[grid_adjusted_regions_fluid][sidebar_second][] = sidebar_first
settings[grid_adjusted_regions_fluid][content][] = sidebar_first
settings[grid_adjusted_regions_fluid][content][] = sidebar_second
; Regions inside a parent group to subtract toget remaining width
settings[grid_adjusted_groups_fluid][content_group][] = sidebar_second

With this:

settings[grid_adjusted_regions] = 
settings[grid_adjusted_groups] =
settings[grid_adjusted_regions_fluid]

I haven't tested, but that should work.

aquariumtap’s picture

Status: Needs review » Closed (works as designed)
dealancer’s picture

Status: Closed (works as designed) » Active

Hey guys,

This issue is still alive, using fresh install Fusion + Fusion Mobile, can't fix it, cause fusiom_mobile.info does not contain regions listed in error, so there is nothing to delete.

aquariumtap’s picture

Assigned: aquariumtap » Unassigned
Poieo’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Fusion Mobile is no longer necessary with the 7.x-2.x version.