Post by gribon7 » Mon Oct 23, 2017 8:33 pm

Good evening

I have a problem with my site
I have put a link to top menu in order to show something from information like about us but i returned back a blank page with this fault

Fatal error: Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template "common/column_left.twig" (looked into: /var/www/vhosts/ekdoseis-astarti.gr/httpdocs/catalog/view/theme).' in /var/www/vhosts/ekdoseis-astarti.gr/httpdocs/system/library/template/Twig/Loader/Filesystem.php:215 Stack trace: #0 /var/www/vhosts/ekdoseis-astarti.gr/httpdocs/system/library/template/Twig/Loader/Filesystem.php(139): Twig_Loader_Filesystem->findTemplate('common/column_l...') #1 /var/www/vhosts/ekdoseis-astarti.gr/httpdocs/system/library/template/Twig/Environment.php(312): Twig_Loader_Filesystem->getCacheKey('common/column_l...') #2 /var/www/vhosts/ekdoseis-astarti.gr/httpdocs/system/library/template/Twig/Environment.php(378): Twig_Environment->getTemplateClass('common/column_l...', NULL) #3 /var/www/vhosts/ekdoseis-astarti.gr/storage/modification/system/library/template/twig.php(42): Twig_Environment->loadTemplate('common/column_l...') #4 /var/www/vhosts/ekdoseis-astarti.gr/httpdocs/system/library/template.php(51): Template\ in /var/www/vhosts/ekdoseis-astarti.gr/httpdocs/system/library/template/Twig/Loader/Filesystem.php on line 215

Can you help me with this?

Thank you in advance

Newbie

Posts

Joined
Tue Sep 05, 2017 7:54 pm

Post by straightlight » Mon Oct 23, 2017 8:40 pm

I have a problem with my site
I have put a link to top menu in order to show something from information like about us but i returned back a blank page with this fault
What is the OC version? Into which TWIG file did you added your link? What is the link code that you added? Where in the file did you added the code? Please provide all the details.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by gribon7 » Mon Oct 23, 2017 8:50 pm

Hello and thank you for your instance reply
OC Version 3.0.2.0
I have put this code <li><a href="http://ekdoseis-astarti.gr/anakoinoseis ... ις</a></li> into menu.twig under line 27

Thank you

Newbie

Posts

Joined
Tue Sep 05, 2017 7:54 pm

Post by straightlight » Mon Oct 23, 2017 8:55 pm

Can you post the entire menu.twig file between code captions?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by gribon7 » Mon Oct 23, 2017 9:26 pm

Code: Select all

{% if categories %}
<div class="container">
  <nav id="menu" class="navbar">
    <div class="navbar-header"><span id="category" class="visible-xs">{{ text_category }}</span>
      <button type="button" class="btn btn-navbar navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"><i class="fa fa-bars"></i></button>
    </div>
    <div class="collapse navbar-collapse navbar-ex1-collapse">
      <ul class="nav navbar-nav">
     
        {% for category in categories %}
        {% if category.children %}
        <li class="dropdown"><a href="{{ category.href }}" class="dropdown-toggle" data-toggle="dropdown">{{ category.name }}</a>
          <div class="dropdown-menu">
            <div class="dropdown-inner"> {% for children in category.children|batch(category.children|length / category.column|round(1, 'ceil')) %}
              <ul class="list-unstyled">
                {% for child in children %}
                <li><a href="{{ child.href }}">{{ child.name }}</a></li>
                {% endfor %}
              </ul>
              {% endfor %}</div>
              
            <a href="{{ category.href }}" class="see-all">{{ text_all }} {{ category.name }}</a> </div>
        </li>
        {% else %}
        <li><a href="{{ category.href }}">{{ category.name }}</a></li>
        {% endif %}
        {% endfor %}
        <li><a href="http://ekdoseis-astarti.gr/anakoinoseis">Ανακοινώσεις</a></li>
        <li><a href="http://ekdoseis-astarti.gr/index.php?route=information/contact">Επικοινωνία</a></li>
      </ul>
    </div>
  </nav>
</div>
{% endif %} 

Newbie

Posts

Joined
Tue Sep 05, 2017 7:54 pm

Post by straightlight » Mon Oct 23, 2017 9:32 pm

Do you see the catalog/view/theme/your_theme/template/common/column_left.twig filename on your file server? When you remove those links, does the error message persists?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by gribon7 » Tue Oct 24, 2017 12:32 am

yes the common_left.twig exist on my file server with this code

Code: Select all

{% if modules %}
<aside id="column-left" class="col-sm-3 hidden-xs">
  {% for module in modules %}
  {{ module }}
  {% endfor %}
</aside>
{% endif %}
Also if i remove those links it comes with the same fault
This link <li><a href="http://ekdoseis-astarti.gr/anakoinoseis ... ις</a></li> is from information in the footer i think that there is a relationship because even if click there the same error is displayed

Furthermore when i want to search a product from the search bar the same error is displayed again

Newbie

Posts

Joined
Tue Sep 05, 2017 7:54 pm

Post by straightlight » Tue Oct 24, 2017 12:36 am

Clear all caches from the admin dashboard and see if the error message still appears on the store-front end.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by gribon7 » Tue Oct 24, 2017 1:10 am

i have done this a lot of time but the error is still there

Newbie

Posts

Joined
Tue Sep 05, 2017 7:54 pm

Post by straightlight » Tue Oct 24, 2017 1:21 am

Perhaps with the TWIG files, it is no longer possible to add other languages. Let's try the following for demonstration purposes.

In your catalog/controller/common/menu.php file,

find:

Code: Select all

$categories = $this->model_catalog_category->getCategories(0);
add below:

Code: Select all

$this->load->language('information/contact');

$data['url_contact'] = $this->url->link('information/contact', '', true);

$data['url_anakoinoseis'] = 'http://ekdoseis-astarti.gr/anakoinoseis';
In catalog/language/your_language/information/contact.php file,

add at the bottom of the file:

Code: Select all

$_['text_anakoinoseis'] = 'Ανακοινώσεις';
$_['text_contact'] = 'Επικοινωνία';
In your menu.twig file, replace:

Code: Select all

<li><a href="http://ekdoseis-astarti.gr/anakoinoseis">Ανακοινώσεις</a></li>
        <li><a href="http://ekdoseis-astarti.gr/index.php?route=information/contact">Επικοινωνία</a></li>
with:

Code: Select all

<li><a href="{{ url_anakoinoseis }}">{{ text_anakoinoseis }}</a></li>
        <li><a href="{{ url_contact }}">{{ text_contact }}</a></li>
This should resolved the problem.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Tue Oct 24, 2017 1:23 am

Post updated above.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by gribon7 » Tue Oct 24, 2017 2:27 am

there is no result

this is my site you can check if you want
ekdoseis-astarti.gr

also if you search something there is the same error and also when you fill the contact form and send the email it displays the same error but the email is sent with success

Newbie

Posts

Joined
Tue Sep 05, 2017 7:54 pm

Post by cyclops12 » Tue Oct 24, 2017 2:54 am

I dont think its to do with adding code to your menu.twig as i added

Code: Select all

<li><a href="http://ekdoseis-astarti.gr/anakoinoseis">Ανακοινώσεις</a></li>
        <li><a href="http://ekdoseis-astarti.gr/index.php?route=information/contact">Επικοινωνία</a></li>
in exactly the same place in my menu.twig and it works fine with no errors
Fresh default 3.0.2.0 hosted locally...

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by gribon7 » Tue Oct 24, 2017 2:59 am

yes i know when i have added the code for first time all were working fine but maybe i did a change somewhere that changed this error.

Thanks a lot for your help and for the your time i will try to find something maybe i wiil put back all the files that i' ve made changes

Newbie

Posts

Joined
Tue Sep 05, 2017 7:54 pm

Post by straightlight » Tue Oct 24, 2017 4:20 am

Simply replace the original menu.twig file from the installation and you should be able to reload the page normally before remaking the changes.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by gribon7 » Tue Oct 24, 2017 3:56 pm

Ok I will do it. Thank you.
I will post again with the result.

Newbie

Posts

Joined
Tue Sep 05, 2017 7:54 pm
Who is online

Users browsing this forum: No registered users and 12 guests