Welcome Guest, Not a member yet? Register   Sign In
Smarty HMVC Environment Variables 1.0.5
#11

[eluser]LNS[/eluser]
Thanks for your module.

Pls help me to fix below errors (I use CI 1.6.1):

Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined index: template_layout

Filename: controllers/default_controller.php

Line Number: 74

========================================
A PHP Error was encountered

Severity: Warning

Message: array_merge() [function.array-merge]: Argument #2 is not an array

Filename: controllers/default_controller.php

Line Number: 74

========================================
A PHP Error was encountered

Severity: Warning

Message: array_merge() [function.array-merge]: Argument #1 is not an array

Filename: controllers/default_controller.php

Line Number: 76

========================================
A PHP Error was encountered

Severity: Warning

Message: array_merge() [function.array-merge]: Argument #2 is not an array

Filename: controllers/home.php
#12

[eluser]Avatar[/eluser]
Sorry for taking so long to get back to you. the error you are getting on lines 74 and 76 is due to the fact that an array is not being loaded to merge with $data to be passed to the module and in turn the template. Make sure that you are properly loading your template layout from the database to be merged into the data array inside your default_controller and your modules. This makes those variables available within your templates to be loaded at run time.
#13

[eluser]monkeymon[/eluser]
A PHP Error was encountered
Severity: Notice

Message: Undefined index: template_layout

Filename: controllers/default_controller.php

Line Number: 74

A PHP Error was encountered
Severity: Warning

Message: array_merge() [function.array-merge]: Argument #2 is not an array

Filename: controllers/default_controller.php

Line Number: 74

A PHP Error was encountered
Severity: Warning

Message: array_merge() [function.array-merge]: Argument #1 is not an array

Filename: controllers/default_controller.php

Line Number: 76

A PHP Error was encountered
Severity: Warning

Message: array_merge() [function.array-merge]: Argument #2 is not an array

Filename: controllers/home.php

Line Number: 49



have the same problem as well
but i cant seem to find out where is the problem...
can u help me ?
#14

[eluser]Avatar[/eluser]
I apologize for not replying sooner. The fix for your problem is this:

you need to cread static links from the templates located inside default_templates to the ones in your current template...do this for all you templates to have default template parts.
cd to your current template and do ln -sf ../../default_template/page pages
# this makes your pages to be the same accoss templates and so on
Code:
root@apex:/var/www/env# ln -sf application/views/smarty/templates/ templates
root@apex:/var/www/env/application/views/smarty/templates/EAI# ln -sf ../../default_template/sections/ sections
root@apex:/var/www/env/application/views/smarty/templates/EAI# ln -sf ../../default_template/controls/ controls
root@apex:/var/www/env/application/views/smarty/templates/EAI# ln -sf ../../default_template/pages/ pages
root@apex:/var/www/env/application/views/smarty/templates/EAI# ln -sf ../../default_template/admin_pages/ admin_pages
root@apex:/var/www/env/application/views/smarty/templates/EAI# ln -sf ../../default_template/admin_layout/ admin_layout
The thing with the template directory structure is that you have to have links going back to your default template in order for things to work properly across multiple templates with the same content on them. Let me know if that worked for you. I'm working on updating this cms for the public domain. Hopefully you will see it here soon.
#15

[eluser]Avatar[/eluser]
Make sure that your application/ directory structure is as follows:
Code:
application/
    config/
        autoload.php
        config.php
        ...
        environ.php
        ...
        routes.php
        smarty_parser.php
        ...
    controllers/
        default_controller.php
    errors/
        ...
    helpers/
        ...
        modules_helper.php
        ...
    hooks/
        ...
    language/
        ...
    libraries/

        smarty/  #smarty lib
        ...
        environ.php
        ...
        modular_extensions.php # works with ME 4.0.22 and close cousin variants
        ...
        smarty_parser.php
        ...
    models/
        ...
        environ_model.php
        ...
        template_model.php
        ...
    modules/
        admin/
            controllers/
                admin.php
            methods/
                account.php
                controls.php
                login.php
                logout.php
                pages.php
                sections.php
                templates.php
                ...
        home/
            controllers/
                home.php
                ...
            methods/
                ...
    views/
        smarty/
            default_template/
                admin_controls/
                    tpl_add_new_page.php
                    tpl_edit_page.php
                    tpl_pages_control.php
                    ...
                admin_layout/
                    tpl_admin_banner.php
                    tpl_admin_content.php
                    tpl_admin_foot.php
                    tpl_admin_head.php
                    tpl_admin_left.php
                    tpl_admin_login.php
                    tpl_admin_right.php
                    ...
                admin_pages/
                    tpl_admin_account.php
                    tpl_admin_manage_page.php
                    tpl_admin_pages_edit.php
                    tpl_admin_pages.php
                    tpl_admin_sections.php
                    tpl_admin_templates.php
                    tpl_admin_users.php
                    ...
                controls/ # use with jquery to load controls....beyond scope here
                    ...
                pages/
                    tpl_about.php
                    tpl_contact.php
                    ...
                    tpl_main_page.php
                    tpl_message_sent.php
                    tpl_page.php
                    tpl_services.php
                    ...
                sections/
                    ...
                    tpl_sections_contact_form.php
                    ...
            templates/
                dark/
                    admin_layout/ #ln -sf ../../default_template/admin_layout/ admin_layout
                    admin_pages/  #ln -sf ../../default_template/admin_pages/ admin_pages
                    assets/
                        css/
                            ...
                            style.css
                            ...
                        images/
                            ...
                        js/
                            ...
                            jquery.js
                            ...
                        pdf/
                            ...
                        swf/
                            ...
                            ads.swf
                            ...
                    config/
                        theme.php
                    controls/ #ln -sf ../../default_template/controls/ controls
                    json_controls/
                        ...
                    layout/
                        ...
                        tpl_banner.php
                        tpl_content.php
                        tpl_foot.php
                        tpl_head.php
                        tpl_left.php
                        tpl_mod_categories.php
                        tpl_right.php
                        tpl_sections.php
                        ...
                    pages/ #ln -sf ../../default_template/pages/ pages
                    sections/ #ln -sf ../../default_template/sections/ sections
                    xml_controls/
                        ...
                    tpl_admin.php
                    tpl_control.php
                    tpl_controls_error.php
                    tpl_index.php
                light/
                    *RECURSION*
templates/ #ln -sf application/views/smarty/templates/ templates

This thing is so powerful. Makes it kinda difficult to maintain the links, redirects and templates between template changes. unless you link your template located inside application.views/smarty/templates/template to template.

I'm using this cms for the base of multiple system right now and it's wonderful. The only thing I don't like is that it currently loads all template pages defined for a template even though not being displayed. But this I will attempt to fix in the next upcoming version.
#16

[eluser]Unknown[/eluser]
Hello


I have a problem !!


Code:
A PHP Error was encountered
Severity: Notice

Message: Undefined index: template_layout

Filename: controllers/default_controller.php

Line Number: 38

A PHP Error was encountered
Severity: Warning

Message: array_merge() [function.array-merge]: Argument #2 is not an array

Filename: controllers/default_controller.php

Line Number: 38

A PHP Error was encountered
Severity: Warning

Message: array_merge() [function.array-merge]: Argument #1 is not an array

Filename: controllers/default_controller.php

Line Number: 39

A PHP Error was encountered
Severity: Warning

Message: array_merge() [function.array-merge]: Argument #2 is not an array

Filename: controllers/home.php

Line Number: 25

Site: http://www.gfxhost.info/en/




Theme © iAndrew 2016 - Forum software by © MyBB