I installed Arastta for a sub domain addon to one of our websites and wanted to play around with the default theme, and when I go to Appearance>Themes, and I set the "Default" theme as the default, and then select the "Settings" button, I get the following error:

Fatal error: Class 'Arastta\Component\Form\Element\Yesno' not found in /home/account/sub.domain.com/admin/model/appearance/theme.php on line 209

Searched for the error and see no mention of it yet, so thinking it might just be me, but thought I would check and see if anyone else gets it.
In General
Tuesday, July 25 2017, 06:29 AM
Share this post:
Responses (1)
  • Accepted Answer

    Hackasacka
    Hackasacka
    Offline
    Tuesday, July 25 2017, 08:51 PM - #Permalink
    Hi Breck,

    This is the same on our server for a new clean install of Arastta v1.6.1 and using the "Default" template. We get a blank page and have the same error reported in the error logs.

    Line 209 in theme.php:-
     $form->addElement(new $class_name($label, $name, $option, $attribute));


    The "Second" template does work and can probably be used to fix this and there may be a thread elsewhere pointing out where to remedy the template?

    However, it is simpler in my opinion to modify the file that the customiser adjusts as this also gives you more options to add lots more too.

    At file location:- "/catalog/view/theme/default/stylesheet/" you should find files
    blog.css
    custom.css
    customizer.css
    stylesheet.css

    custom.css is currently empty on a clean install so forget this for now and blog.css relates to the blog page. Stylesheet.css is about 1000 lines and is the main file for styling. These files can be named anything you like if you do it yourself although style.css or stylesheet.css is pretty common. They are usually referred to in the head section of a web page :-

    <l-ink href="/catalog/view/theme/default/stylesheet/stylesheet.css" rel="stylesheet">
    <l-ink href="/catalog/view/theme/default/stylesheet/customizer.css" type="text/css" rel="stylesheet" media="screen" ></l>
    <l-ink href="/catalog/view/theme/default/stylesheet/custom.css" type="text/css" rel="stylesheet" media="screen" ></l>


    With a web browser such as "Firefox" or "Google "Chrome" you can right-click on an area you would like to view and left-click "inspect element" this then shows the html markup on the left-hand-side and the CSS on the right-hand-side at the bottom of your web site and allows you to make temporary changes to the code.

    It is also possible to do what's called a "view source" to see the actual page being parsed to the web browser too.

    They are called "Cascading Style Sheets" and are used for changing the style of a web page. The customiser merely gives you a convenient, or not so sometimes, method for changing basic colours fonts and fonts used on your site.

    An example in "customizer.css" might be the colour for the top menu:-
     #menu { 
    background-color : #008db9;
    }

    The "#008db9" is hexadecimal for how much red, green and blue. In this case "00" means no red, "8d" the amount of green and "b9" the amount of blue. The values go from 0-255 where 255 is "ff" (16 x 15 + 15). This notation for the colour can be written in different formats even using a colour like "red" "aqua" "violet", but you get many more possibilities if you use hexadecimal or decimal numbers.

    The requirement here is that you need ftp or a file manager to access your web pages directly which is not always available with some host providers (find one that does)? In this instance there is a file manager under Tools in Arastta.

    As the "settings" for the "Second" template is used to modify or add your favourite social networks and this doesn't exist in the "Default" template it should be removed as an option in the admin for this template by Arastta to avoid errors. Another option would be to include the social network code to the page so that it can be utilised with the "settings" option in admin.

    Here is the code in file location "/catalog/view/theme/second/template/common/header.tpl"
    <header>
    <div class="container">
    <div class="row">
    <div class="col-sm-<?php echo $logo_left_area; ?> hidden-xs">
    <div class="text-muted social-links"><?php if($theme_config->get('facebook_url', 'https://facebook.com/#')) : ?><a href="/<?php echo $theme_config->get('facebook_url', 'https://facebook.com/#'); ?>" target="_blank" class="facebook"><span class="fa fa-2x fa-fw fa-facebook"></span></a><?php endif; ?> <?php if($theme_config->get('twitter_url', 'https://twitter.com/#')) : ?><a href="/<?php echo $theme_config->get('twitter_url', 'https://twitter.com/#'); ?>" target="_blank" class="twitter"><span class="fa fa-2x fa-fw fa-twitter"></span></a><?php endif; ?> <?php if($theme_config->get('pinterest_url', 'https://pinterest.com/#')) : ?><a href="/<?php echo $theme_config->get('pinterest_url', 'https://pinterest.com/#'); ?>" target="_blank" class="pinterest"><span class="fa fa-2x fa-fw fa-pinterest"></span></a><?php endif; ?> <?php if($theme_config->get('instagram_url', 'https://instagram.com/#')) : ?><a href="/<?php echo $theme_config->get('instagram_url', 'https://instagram.com/#'); ?>" target="_blank" class="instagram"><span class="fa fa-2x fa-fw fa-instagram"></span></a><?php endif; ?></div>
    </div>
    <div class="col-sm-<?php echo $theme_config->get('logo_width', 4); ?>">
    <div id="logo" class="text-center">
    <?php if ($logo) { ?>
    <a href="/<?php echo $home; ?>"><img src="/<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" class="img-responsive" /></a>
    <?php } else { ?>
    <h1><a href="/<?php echo $home; ?>"><?php echo $name; ?></a></h1>
    <?php } ?>
    </div>
    </div>
    <div class="col-sm-<?php echo $logo_right_area; ?>"><?php echo $cart; ?></div>
    </div>
    </div>
    </header>


    With so many servers used for hosting and the almost endless permutations of code being modified it is difficult to account for every situation where an error may occur.

    In this example Arastta could add the code to the "Default" or remove the option to change "settings" that do not exist in the next release.

    Unfortunately, this forum doesn't allow all of the code to be shown and therefor may not be as clear to the reader as we would like.

    This code is opensource and therefor free, so we are expected to contribute too.

    Hope this helps.

    Regards,

    Hackasacka
    The reply is currently minimized Show
Your Reply