Coder Social home page Coder Social logo

maxnufsmarty's People

Contributors

maxnuf avatar siemienik avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

maxnufsmarty's Issues

Excuse me for my mistake is how to return a responsibility!!!!!!!!

Fatal error: Uncaught exception 'Zend\ModuleManager\Exception\RuntimeException' with message 'Module (MaxnufSmarty) could not be initialized.' in /users/administrator/htdocs/zf2/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php:144 Stack trace: #0 /users/administrator/htdocs/zf2/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php(85): Zend\ModuleManager\ModuleManager->loadModule('MaxnufSmarty') #1 [internal function]: Zend\ModuleManager\ModuleManager->onLoadModules(Object(Zend\ModuleManager\ModuleEvent)) #2 /users/administrator/htdocs/zf2/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(464): call_user_func(Array, Object(Zend\ModuleManager\ModuleEvent)) #3 /users/administrator/htdocs/zf2/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(208): Zend\EventManager\EventManager->triggerListeners('loadModules', Object(Zend\ModuleManager\ModuleEvent), NULL) #4 /users/admin in /users/administrator/htdocs/zf2/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php on line 144

Can't {include} files with relative path

When trying to include a file by relative path, ie:

{include file="./subdirectory/file.tpl"}

an error is thrown from vendor/smarty/smarty/distribution/libs/sysplugins/smarty_resource.php:216:

Template './subdirectory/file.tpl' cannot be relative to template of resource type 'maxnufFile'

I was able to fix this by changing the string 'maxnufFile' to simply 'file' on lines 30 and 31 in MaxnufSmarty\Smarty\MaxnufSmarty. Though I'm not sure if that breaks anything else. Or perhaps there is already a way to allow relative includes via a config setting?

Here is the full stack trace:
#0 /Users/markisacat/Sites/dance-rialto/vendor/smarty/smarty/distribution/libs/sysplugins/smarty_internal_resource_file.php(29): Smarty_Resource->buildFilepath(Object(Smarty_Template_Source), Object(Smarty_Internal_Template))
#1 /Users/markisacat/Sites/dance-rialto/vendor/smarty/smarty/distribution/libs/sysplugins/smarty_resource.php(529): Smarty_Internal_Resource_File->populate(Object(Smarty_Template_Source), Object(Smarty_Internal_Template))
#2 /Users/markisacat/Sites/dance-rialto/vendor/smarty/smarty/distribution/libs/sysplugins/smarty_internal_template.php(636): Smarty_Resource::source(Object(Smarty_Internal_Template))
#3 /Users/markisacat/Sites/dance-rialto/vendor/smarty/smarty/distribution/libs/sysplugins/smarty_internal_templatebase.php(117): Smarty_Internal_Template->__get('source')
#4 /Users/markisacat/Sites/dance-rialto/vendor/smarty/smarty/distribution/libs/sysplugins/smarty_internal_template.php(286): Smarty_Internal_TemplateBase->fetch(NULL, NULL, NULL, NULL, false, false, true)
#5 /Users/markisacat/Sites/dance-rialto/data/Smarty/smarty_compile/56e3ccab3dbbb094b6055802928349438028de7e.maxnufFile.list.tpl.php(25): Smarty_Internal_Template->getSubTemplate('./partials/_cat...', NULL, NULL, NULL, NULL, Array, 0)
#6 /Users/markisacat/Sites/dance-rialto/vendor/smarty/smarty/distribution/libs/sysplugins/smarty_internal_templatebase.php(180): content_51a7f425176743_05499958(Object(Smarty_Internal_Template))
#7 /Users/markisacat/Sites/dance-rialto/vendor/maxnuf/maxnuf-smarty/src/MaxnufSmarty/View/Renderer/Renderer.php(105): Smarty_Internal_TemplateBase->fetch('/Users/markisac...')
#8 /Users/markisacat/Sites/dance-rialto/vendor/zendframework/zendframework/library/Zend/View/View.php(205): MaxnufSmarty\View\Renderer\Renderer->render(Object(Zend\View\Model\ViewModel))
#9 /Users/markisacat/Sites/dance-rialto/vendor/zendframework/zendframework/library/Zend/View/View.php(233): Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#10 /Users/markisacat/Sites/dance-rialto/vendor/zendframework/zendframework/library/Zend/View/View.php(198): Zend\View\View->renderChildren(Object(Zend\View\Model\ViewModel))
#11 /Users/markisacat/Sites/dance-rialto/vendor/zendframework/zendframework/library/Zend/Mvc/View/Http/DefaultRenderingStrategy.php(102): Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#12 [internal function]: Zend\Mvc\View\Http\DefaultRenderingStrategy->render(Object(Zend\Mvc\MvcEvent))
#13 /Users/markisacat/Sites/dance-rialto/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#14 /Users/markisacat/Sites/dance-rialto/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('render', Object(Zend\Mvc\MvcEvent), Array)
#15 /Users/markisacat/Sites/dance-rialto/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(347): Zend\EventManager\EventManager->trigger('render', Object(Zend\Mvc\MvcEvent))
#16 /Users/markisacat/Sites/dance-rialto/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(322): Zend\Mvc\Application->completeRequest(Object(Zend\Mvc\MvcEvent))
#17 /Users/markisacat/Sites/dance-rialto/public/index.php(12): Zend\Mvc\Application->run()
#18 {main}

Hey.

First of all thanks for creating this stuff. As integrating smarty into ZF2 for framework newbies is nightmare.

Second, have installed your module but in templates I get displayed
{$this->doctype()}
instead of having doctype executed and outputted.
Any possible reasons?
thanks

Examples of usage

Hi,

Would you please provide an example or two of how MaxnufSmarty is used inside a Controller class.

How template variables are set for example and how the template is selected.

Many thanks.

Ian

Getting an error template

Hi ,

First of all thank you for this module, have been searching all week for smarty to zf2 integration and this module comes very close to completing my task. Its just that I am getting a 404 page template instead of the index template and have no idea why. Here is the page that i get:

A 404 error occurred
message ?>
reason) && $this->reason): ?> reason) { case 'error-controller-cannot-dispatch': $reasonMessage = 'The requested controller was unable to dispatch the request.'; break; case 'error-controller-not-found': $reasonMessage = 'The requested controller could not be mapped to an existing controller class.'; break; case 'error-controller-invalid': $reasonMessage = 'The requested controller was not dispatchable.'; break; case 'error-router-no-match': $reasonMessage = 'The requested URL could not be matched by routing.'; break; default: $reasonMessage = 'We cannot determine at this time why a 404 was generated.'; break; } ?>

controller) && $this->controller): ?>

Controller:
escape($this->controller) ?> controller_class) && $this->controller_class && $this->controller_class != $this->controller ) { echo " (resolves to " . $this->escape($this->controller_class) . ")"; } ?> exception) && $this->exception): ?>
Exception:

escape($this->exception->getMessage()) ?>
Stack trace

exception->getTraceAsString() ?>

....and below is the 404 template code:

A 404 error occurred

message ?>

reason) && $this->reason): ?> reason) { case 'error-controller-cannot-dispatch': $reasonMessage = 'The requested controller was unable to dispatch the request.'; break; case 'error-controller-not-found': $reasonMessage = 'The requested controller could not be mapped to an existing controller class.'; break; case 'error-controller-invalid': $reasonMessage = 'The requested controller was not dispatchable.'; break; case 'error-router-no-match': $reasonMessage = 'The requested URL could not be matched by routing.'; break; default: $reasonMessage = 'We cannot determine at this time why a 404 was generated.'; break; } ?>

controller) && $this->controller): ?>
Controller:
escape($this->controller) ?> controller_class) && $this->controller_class && $this->controller_class != $this->controller ) { echo " (resolves to " . $this->escape($this->controller_class) . ")"; } ?>
exception) && $this->exception): ?>

Exception:

escape($this->exception->getMessage()) ?>

Stack trace

exception->getTraceAsString() ?>

...and my view manager part in module.config.php

.................

'view_manager' => array(
'strategies' => array(
'SmartyViewStrategy'
),
'display_not_found_reason' => true,
'display_exceptions' => true,
'doctype' => 'HTML5',
'not_found_template' => 'error/404',
'exception_template' => 'error/index',
'template_map' => array(
'layout/layout' => DIR . '/../view/layout/layout.tpl',
'application/index/index' => DIR . '/../view/application/index/index.tpl',
'error/404' => DIR . '/../view/error/404.tpl',
'error/index' => DIR . '/../view/error/index.tpl',
),
'template_path_stack' => array(
'application' => DIR . '/../view',
),
),

..................

Thank you,

Levy

Fatal error: Class 'Smarty' not found in mysite/vendor/MaxnufSmarty/src/MaxnufSmarty/Smarty/MaxnufSmarty.php on line 9

Hi,

I've installed MaxnufSmarty into my ZF2 application under the vendors/MaxnufSmarty folder.

composer.phar update has been run against the composer.json file there and there were no error messages. The Smarty libraries have been installed.

It appears that neither the vendor/MaxnufSmarty/vendor/composer/autoload_classmap,php nor the vendor/MaxnufSmarty/vendor/smarty/smarty/vendor/composer/autoload_classmap.php are being loaded.

Can you suggest a solution here? I suspect there may be a line missing in the configuration somewhere but I'm not sure where.

Thanks,
Ian

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.