Blocks in Crisp theme not aligning correctly after 2.8 upgrade

Blocks in Crisp theme not aligning correctly after 2.8 upgrade

by Jodi Selander -
Number of replies: 12
I just upgraded to 2.8.8+.
I have a custom theme installed, based on the Crisp theme.
I have several blocks configured to appear on the right side of the page. After the upgrade (from 2.6.5), they only appear on the left, under Navigation and Administration.

I have confirmed that the blocks will not appear on the right side when I switch the theme to the base Crisp (so it's not in my customized theme code).
They WILL appear on the right side when the theme is changed to either Clean or More.

Has anyone found a solution?
Average of ratings: -
In reply to Jodi Selander

Re: Blocks in Crisp theme not aligning correctly after 2.8 upgrade

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi mods, Mary, Howard or Alex, please move this to the themes forum.

Thanks,

Gareth

In reply to Jodi Selander

Re: Blocks in Crisp theme not aligning correctly after 2.8 upgrade

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Have you asked the developers on: https://moodle.org/plugins/pluginversions.php?plugin=theme_crisp ?

Did the theme ever support blocks on the right?

Some themes don't have right side blocks, its just their style.

When you say you have a custom theme, is it a clone or a child theme or just pure custom CSS?

In reply to Gareth J Barnard

Re: Blocks in Crisp theme not aligning correctly after 2.8 upgrade

by Jodi Selander -

Thanks for your response. I can't move this to the Themes forum; I tried to post over there but then it was a duplicate.

To answer your questions:

I had all my blocks on the right in 2.6.5, in the course pages. It was only after my upgrade to 2.8 that the blocks will not display on the right, even though they are configured to do so. So yes, it did support right-side blocks.

My theme is a direct copy of Crisp (modified off the new copy), which is based on Bootstrap.

I downloaded their latest version, which states it is compatible with 2.8. It works except for the right-side blocks position issue, a navbar disappearing issue, and a home icon disappearing. I did not post over on their page because I didn't realize I could (I don't post for support often, although I've been a Moodle user since 2007). I did just post a comment over there to see if they'll respond.

Right-side blocks appear on some pages correctly (category pages, the "/my" page - ie. index.php), but not on the course pages (ie view.php). I had student enrollments  and course completions showing on the right side so they're always visible in the courses. Now they're going to have to click on the navigation button (which is a black square instead of the home icon), and scroll way down past the Navigation and Administration blocks.

It is definitely a Theme issue, so I'm hoping it can get resolved before I have to take the site out of maintenance mode on Monday - the students are going to be complaining about not finding their information. (They sometimes struggle to find things that I've put right in front of them! Hiding it from them is going to be... interesting.)

In reply to Jodi Selander

Re: Blocks in Crisp theme not aligning correctly after 2.8 upgrade

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Jodi,

The statement that it is compatible with M2.8 just means that it works with that version.  The position of the blocks on that page are subjective of the theme.

Ok, given that and the information you have provided, it is probably a matter of altering the 'config.php' file.  Look at: https://docs.moodle.org/dev/Themes_overview#Layouts to help.

In the context of the duplicate post, as a moderator I had to delete it.  I cannot enforce one rule for one and another for somebody else.  What can happen is that the request to move is done (as I only have that ability in the themes and course formats forum) or what I have done is post in the themes forum a link to this post asking for help (https://moodle.org/mod/forum/discuss.php?d=321393) as references to posts are ok.

Kind regards,

Gareth

In reply to Gareth J Barnard

Re: Blocks in Crisp theme not aligning correctly after 2.8 upgrade

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
In reply to Mary Evans

Re: Blocks in Crisp theme not aligning correctly after 2.8 upgrade

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Mary,

Oh no!  Ugly!

Gareth

In reply to Jodi Selander

Re: Blocks in Crisp theme not aligning correctly after 2.8 upgrade

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

The theme Crisp only has blocks on the left.

Can you copy and paste the content of your customised theme's config.php? That is the only way we can find out where the blocks are positioned, and also help you.

Thanks

Mary

In reply to Mary Evans

Re: Blocks in Crisp theme not aligning correctly after 2.8 upgrade

by Jodi Selander -

Thank you for your help Mary. Yes, Crisp does allow right-side blocks. I'll attach a screenshot where the blocks are on the right (via the /my page, or index.php). They just won't appear on the right in the course pages (i.e, view.php).

I haven't touched the config.php file at all, so it's pretty much what you've seen. I'll post it here though. The issue appears with the 'course' array in columns2.php.
I edited columns2.php in an test to see if I could get the navbar back (my comments added):

<!-- Blank when the <div> and <nav> tags are there, so I removed
  <div id="page-navbar" class="clearfix">
    <nav id="pageheader-nav" class="breadcrumb-nav"><?php echo $OUTPUT->navbar(); ?></nav>
  </div>
-->
<?php echo $OUTPUT->navbar(); ?>

Now the navbar is back on the top of the courses pages, but appears double in some places. So I think it's something with not reading the .css formatting properly.

Here is the content of my config.php:

xxxxxxxxxxxxx config.php xxxxxxxxxxxxxxxxxx

$THEME->name = 'pbiu_theme';


// The only thing you need to change in this file when copying it to
// create a new theme is the name above. You also need to change the name
// in version.php and lang/en/theme_pbiu_theme.php as well.

$THEME->doctype = 'html5';
$THEME->parents = array('bootstrapbase');
$THEME->sheets = array('custom');
$THEME->supportscssoptimisation = false;
$THEME->yuicssmodules = array();

$THEME->editor_sheets = array();

$THEME->plugins_exclude_sheets = array(
    'block' => array(
        'html',
    ),
);

$THEME->rendererfactory = 'theme_overridden_renderer_factory';
$THEME->csspostprocess = 'theme_pbiu_theme_process_css';

$THEME->blockrtlmanipulations = array(
    'side-pre' => 'side-post',
    'side-post' => 'side-pre'
);

$THEME->layouts = array(
  'login' => array(
        'file' => 'column1login.php',
        'regions' => array(),
        'options' => array('langmenu' => true),
    ),
  // The site home page.
  'frontpage' => array(
      'file' => 'columns3home.php',
      'regions' => array('side-pre'),
      'defaultregion' => 'side-pre',
      'options' => array('nonavbar' => true),
  ),
  'course' => array(
      'file' => 'columns2.php',
      'regions' => array('side-pre'),
      'defaultregion' => 'side-pre',
      'options' => array('nonavbar' => true),
  ),
  'blog' => array(
      'file' => 'masonryblogpage.php',
      'regions' => array('side-pre'),
      'defaultregion' => 'side-pre',
      'options' => array('nonavbar' => true),
  ),
  'coursecat' => array(
      'file' => 'columns2.php',
      'regions' => array('defaultregion' => 'side-pre'),
      'options' => array('nonavbar' => true),
  ),
);

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Attachment scnshot-index-blocksonright.png
In reply to Jodi Selander

Re: Blocks in Crisp theme not aligning correctly after 2.8 upgrade

by Jodi Selander -

I just messed with the config.php a bit.

  'course' => array(
      'file' => 'columns2.php',
      'regions' => array('side-pre'),
      'defaultregion' => 'side-pre',
      'options' => array('nonavbar' => false),

Setting "nonavbar => false" makes the navbar appear 2x on the course pages, properly formatted.

So I undid my hack on the columns.php (above) where I commented it out. But now I still have the same issue; 2 navbars or no navbars, it's not what I need.

I'm not going to touch config.php without further instruction, if you know of something that might help!

The blocks on the right is more important to me than the navbar situation. The students really need to see their enrollment timer and course completion blocks right away in their courses. If I make them click to see... they'll be confused.

In reply to Jodi Selander

Re: Blocks in Crisp theme not aligning correctly after 2.8 upgrade

by DualCube Team -
Picture of Plugin developers
Hi Jodi,


I understand your problem and  I am checking what we can do to support the blocks on the right. Allow me sometime and I will surely get back to you.


Thanks and Regards,

Arindam

In reply to DualCube Team

Re: Blocks in Crisp theme not aligning correctly after 2.8 upgrade

by Jodi Selander -

Thank you Arindam! I appreciate you looking into this.

I love the Crisp theme for my site, it really is fantastic.