Community Forums

Module names are all called 'Module'

Support for Modules & Sideboxes

Module names are all called 'Module'

Postby speedimpex » Wed May 23, 2012 7:45 am

I hope someone can help. We're on v 1.4.9.5
We have noticed that when you go into Extensions, modules that all the module names are now just called 'modules'. There are 20 modules but we can no longer see what they represent. I can only guess at what they're for. The only ones I can work out are for Google Analytics as there is some code when you go to edit the page, and Category Wall because there is some facebook code in there (currently disabled as I can't get the facebook logo to appear on the website. It just displays the code - any ideas on that one would be appreciated).
We noticed this change a few weeks ago. So if anyone has any ideas why it would have changed, and how to get it back to what it should be.
Many thanks
Gill
speedimpex
 
Posts: 69
Joined: Mon Jul 11, 2011 6:17 pm

Re: Module names are all called 'Module'

Postby OpenCart Addons » Wed May 23, 2012 2:50 pm

Did you change the language setting of your administration panel?

If so, you'll need to make a copy of the english language directory and rename it to the language you're using.


Joel.
User avatar
OpenCart Addons
 
Posts: 511
Joined: Thu Nov 24, 2011 2:51 am

Re: Module names are all called 'Module'

Postby speedimpex » Wed May 23, 2012 2:56 pm

Hi Joel
Sorry, being extremely thick here, but how do you change the language settings? Where?
and where do I get the english language directory from?

Sorry.
speedimpex
 
Posts: 69
Joined: Mon Jul 11, 2011 6:17 pm

Re: Module names are all called 'Module'

Postby OpenCart Addons » Wed May 23, 2012 5:30 pm

You would change it under:
Admin CP > System > Settings > YourStore [edit] > Local > Administration Language

Odds are if you don't know where it is, you never changed it.


Regards,
Joel.
User avatar
OpenCart Addons
 
Posts: 511
Joined: Thu Nov 24, 2011 2:51 am

Re: Module names are all called 'Module'

Postby speedimpex » Wed May 30, 2012 2:35 pm

The administration is set to English. And there's no other option to choose on the drop down.
Gill
speedimpex
 
Posts: 69
Joined: Mon Jul 11, 2011 6:17 pm

Re: Module names are all called 'Module'

Postby speedimpex » Sun Jun 03, 2012 3:16 pm

Any other ideas?
speedimpex
 
Posts: 69
Joined: Mon Jul 11, 2011 6:17 pm

Re: Module names are all called 'Module'

Postby speedimpex » Tue Jun 19, 2012 1:25 pm

Hi there, I'm wondering if anyone can help us resolve this issue. Many thanks. Gill
speedimpex
 
Posts: 69
Joined: Mon Jul 11, 2011 6:17 pm

Re: Module names are all called 'Module'

Postby OpenCart Addons » Tue Jun 19, 2012 2:39 pm

Sorry for the delay in responding.

Could you attach a copy of your welcome module controller file, as well as the language file?

admin/controller/module/welcome.php
admin/language/english/module/welcome.php


Regards,
Joel.
User avatar
OpenCart Addons
 
Posts: 511
Joined: Thu Nov 24, 2011 2:51 am

Re: Module names are all called 'Module'

Postby speedimpex » Sun Jun 24, 2012 7:31 am

Hi Joel, this is what's in the admin/controller/module/welcome.php

Code: Select all
<?php
class ControllerModuleWelcome extends Controller {
    private 
$error = array(); 
     
    public function 
index() {   
        
$this->load->language('module/welcome');

        
$this->document->setTitle($this->language->get('heading_title'));
        
        
$this->load->model('setting/setting');
                
        if ((
$this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
            
$this->model_setting_setting->editSetting('welcome'$this->request->post);        
            
            
$this->session->data['success'] = $this->language->get('text_success');
                        
            
$this->redirect($this->url->link('extension/module''token=' $this->session->data['token'], 'SSL'));
        }
                
        
$this->data['heading_title'] = $this->language->get('heading_title');

        
$this->data['text_enabled'] = $this->language->get('text_enabled');
        
$this->data['text_disabled'] = $this->language->get('text_disabled');
        
$this->data['text_content_top'] = $this->language->get('text_content_top');
        
$this->data['text_content_bottom'] = $this->language->get('text_content_bottom');        
        
$this->data['text_column_left'] = $this->language->get('text_column_left');
        
$this->data['text_column_right'] = $this->language->get('text_column_right');
        
        
$this->data['entry_description'] = $this->language->get('entry_description');
        
$this->data['entry_layout'] = $this->language->get('entry_layout');
        
$this->data['entry_position'] = $this->language->get('entry_position');
        
$this->data['entry_status'] = $this->language->get('entry_status');
        
$this->data['entry_sort_order'] = $this->language->get('entry_sort_order');
        
        
$this->data['button_save'] = $this->language->get('button_save');
        
$this->data['button_cancel'] = $this->language->get('button_cancel');
        
$this->data['button_add_module'] = $this->language->get('button_add_module');
        
$this->data['button_remove'] = $this->language->get('button_remove');
        
        
$this->data['tab_module'] = $this->language->get('tab_module');
        
        
$this->data['token'] = $this->session->data['token'];

         if (isset(
$this->error['warning'])) {
            
$this->data['error_warning'] = $this->error['warning'];
        } else {
            
$this->data['error_warning'] = '';
        }

          
$this->data['breadcrumbs'] = array();

           
$this->data['breadcrumbs'][] = array(
               
'text'      => $this->language->get('text_home'),
            
'href'      => $this->url->link('common/home''token=' $this->session->data['token'], 'SSL'),
              
'separator' => false
           
);

           
$this->data['breadcrumbs'][] = array(
               
'text'      => $this->language->get('text_module'),
            
'href'      => $this->url->link('extension/module''token=' $this->session->data['token'], 'SSL'),
              
'separator' => ' :: '
           
);
        
           
$this->data['breadcrumbs'][] = array(
               
'text'      => $this->language->get('heading_title'),
            
'href'      => $this->url->link('module/welcome''token=' $this->session->data['token'], 'SSL'),
              
'separator' => ' :: '
           
);
        
        
$this->data['action'] = $this->url->link('module/welcome''token=' $this->session->data['token'], 'SSL');
        
        
$this->data['cancel'] = $this->url->link('extension/module''token=' $this->session->data['token'], 'SSL');

        if (isset(
$this->request->post['welcome_module'])) {
            
$modules explode(','$this->request->post['welcome_module']);
        } elseif (
$this->config->get('welcome_module') != '') {
            
$modules explode(','$this->config->get('welcome_module'));
        } else {
            
$modules = array();
        }    
        
        
$this->load->model('design/layout');
        
        
$this->data['layouts'] = $this->model_design_layout->getLayouts();
        
        
$this->load->model('localisation/language');
        
        
$languages $this->model_localisation_language->getLanguages();
                
        foreach (
$modules as $module) {
            foreach (
$languages as $language) {
                if (isset(
$this->request->post['welcome_' $module '_description_' $language['language_id']])) {
                    
$this->data['welcome_' $module '_description_' $language['language_id']] = $this->request->post['welcome_' $module '_description_' $language['language_id']];
                } else {
                    
$this->data['welcome_' $module '_description_' $language['language_id']] = $this->config->get('welcome_' $module '_description_' $language['language_id']);
                }
            }
            
            if (isset(
$this->request->post['welcome_' $module '_layout_id'])) {
                
$this->data['welcome_' $module '_layout_id'] = $this->request->post['welcome_' $module '_layout_id'];
            } else {
                
$this->data['welcome_' $module '_layout_id'] = $this->config->get('welcome_' $module '_layout_id');
            }    
                        
            if (isset(
$this->request->post['welcome_' $module '_position'])) {
                
$this->data['welcome_' $module '_position'] = $this->request->post['welcome_' $module '_position'];
            } else {
                
$this->data['welcome_' $module '_position'] = $this->config->get('welcome_' $module '_position');
            }    
                        
            if (isset(
$this->request->post['welcome_' $module '_status'])) {
                
$this->data['welcome_' $module '_status'] = $this->request->post['welcome_' $module '_status'];
            } else {
                
$this->data['welcome_' $module '_status'] = $this->config->get('welcome_' $module '_status');
            }
            
            if (isset(
$this->request->post['welcome_' $module '_sort_order'])) {
                
$this->data['welcome_' $module '_sort_order'] = $this->request->post['welcome_' $module '_sort_order'];
            } else {
                
$this->data['welcome_' $module '_sort_order'] = $this->config->get('welcome_' $module '_sort_order');
            }                            
        }
        
        
$this->data['modules'] = $modules;
        
$this->data['languages'] = $languages;
        
        if (isset(
$this->request->post['welcome_module'])) {
            
$this->data['welcome_module'] = $this->request->post['welcome_module'];
        } else {
            
$this->data['welcome_module'] = $this->config->get('welcome_module');
        }

        
$this->template 'module/welcome.tpl';
        
$this->children = array(
            
'common/header',
            
'common/footer',
        );
                
        
$this->response->setOutput($this->render());
    }
    
    private function 
validate() {
        if (!
$this->user->hasPermission('modify''module/welcome')) {
            
$this->error['warning'] = $this->language->get('error_permission');
        }
        
        if (!
$this->error) {
            return 
true;
        } else {
            return 
false;
        }    
    }
}
?>
Last edited by Johnathan on Wed Jul 04, 2012 11:02 pm, edited 1 time in total.
Reason: Added [code] tags for readability
speedimpex
 
Posts: 69
Joined: Mon Jul 11, 2011 6:17 pm

Re: Module names are all called 'Module'

Postby speedimpex » Sun Jun 24, 2012 7:34 am

Hi Joel. For admin/language/english/module/welcome.php there is nothing there. Once you have got to English, there is no module. On our local PC there is nothing after module, i.e. no welcome.php. I'm guessing it's something to do with this
speedimpex
 
Posts: 69
Joined: Mon Jul 11, 2011 6:17 pm

Re: Module names are all called 'Module'

Postby OpenCart Addons » Fri Jun 29, 2012 3:46 pm

Are you receiving errors in your error log stating something about it not being able to find the language directory?

Odds are this is your problem.

I'd suggest downloading a copy of OpenCart and taking the language directory from it, this should solve your problem.


Regards,
Joel.
User avatar
OpenCart Addons
 
Posts: 511
Joined: Thu Nov 24, 2011 2:51 am

Re: Module names are all called 'Module'

Postby speedimpex » Sat Jun 30, 2012 11:45 am

Hi Joel,
There are messages like this in the error log. Are they related?
2012-05-22 11:33:06 - PHP Notice: Undefined variable: text_image_manager in /home/users/uks71623/html/speedypetshop.co.uk/admin/view/template/module/htmlmodule1.tpl on line 116
2012-04-18 13:17:17 - PHP Notice: Undefined offset: 7 in /home/users/uks71623/html/speedypetshop.co.uk/catalog/view/theme/petshop/template/module/categorywall.tpl on line 8
If I take the language directory from downloading a copy, will it overwrite anything that we've added? I know there is 1 module that we have added on top of what's in the default. The categorywall module.
Cheers
Gill
speedimpex
 
Posts: 69
Joined: Mon Jul 11, 2011 6:17 pm

Re: Module names are all called 'Module'

Postby speedimpex » Wed Jul 04, 2012 10:30 am

Hi there
Any update on this please.
Thanks
Gill
speedimpex
 
Posts: 69
Joined: Mon Jul 11, 2011 6:17 pm

Re: Module names are all called 'Module'

Postby OpenCart Addons » Wed Jul 04, 2012 5:09 pm

Hi Gill,

Sorry, my PC decided to not work for the past weekend. Finally got it back up and running.

The undefined variables are where the template file is looking for the variable $text_image_manager, but this variable has not been sent from the controller file.

If you take the downloaded language directory, you shouldn't have any issues as only the default language files come in the download package, and all addon extensions should come with their own language files.

If it would be easier for you, you can send me an email directly at webmaster@opencartaddons.com


Regards,
Joel.
User avatar
OpenCart Addons
 
Posts: 511
Joined: Thu Nov 24, 2011 2:51 am


Return to Modules

Who is online

Users browsing this forum: sooty and 14 guests

Hosted by Arvixe Web Hosting