Aura view: getting error

17 views
Skip to first unread message

dstefani

unread,
Feb 11, 2016, 4:55:53 PM2/11/16
to The Aura Project for PHP
Hello,
I am trying to set up a simple use case for Aura.view.
The legacy code currently in use also uses Aura Sql and to use it, the files are included in a base model file with require_once and seem to work fine.
To start small I downloaded a zip of View and call the files into page and followed the docs, putting everything but the content of the browse.php in one file.

I get no errors until I try to invoke the view with:
$output = $view->__invoke();

Here is the error:

HP Fatal error:  Uncaught exception 'Aura\View\Exception\HelperNotFound' with message 'escape' in /Applications/XAMPP/xamppfiles/htdocs/aura_work/src/View/HelperRegistry.php:99
Stack trace:
#0 /Applications/XAMPP/xamppfiles/htdocs/aura_work/src/View/HelperRegistry.php(54): Aura\View\HelperRegistry->get('escape')
#1 [internal function]: Aura\View\HelperRegistry->__call('escape', Array)
#2 [internal function]: Aura\View\HelperRegistry->escape()
#3 /Applications/XAMPP/xamppfiles/htdocs/aura_work/src/View/AbstractView.php(208): call_user_func_array(Array, Array)
#4 /Applications/XAMPP/xamppfiles/htdocs/aura_work/templates/views/browse.php(3): Aura\View\AbstractView->__call('escape', Array)
#5 /Applications/XAMPP/xamppfiles/htdocs/aura_work/templates/views/browse.php(3): Aura\View\View->escape()
#6 /Applications/XAMPP/xamppfiles/htdocs/aura_work/src/View/TemplateRegistry.php(279): require('/Applications/X...')
#7 /Applications/XAMPP/xamppfiles/htdocs/aura_work/src/View/View.php(58): Aura\View\View->Aura\View\{closure}(Array)
#8 /A in /Applications/XAMPP/xamppfiles/htdocs/aura_work/src/View/HelperRegistry.php on line 99

Your help is appreciated,

- D

Hari K T

unread,
Feb 11, 2016, 11:45:16 PM2/11/16
to aur...@googlegroups.com
Hi,

It seems you have not registered any helpers.

The escape helper is in Aura.Html. In case you need those Html helpers you need to download Aura.Html also.

I have a small repo which shows how to bind Aura.View + Aura.Html . See https://github.com/harikt/AuraViewExample .

Please note the specific line that does the integration https://github.com/harikt/AuraViewExample/blob/af7ac57690c838bebc9a62ff6df5a8c55c913a83/view.php#L4-L8

There are alternative means though ;-) .

Thank you

Hari KT

Hari K T

You can ring me : +91 9388 75 8821

Skype  : kthari85
Twitter : harikt

--
You received this message because you are subscribed to the Google Groups "The Aura Project for PHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to auraphp+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

dstefani

unread,
Feb 12, 2016, 1:51:13 PM2/12/16
to The Aura Project for PHP
Hello Hari,

I did realize my problem was escaping. I then used the example from the GitHub docs and it worked fine.

I intend to integrate Aura html into my project.

Thank you for your reply,

- Don

Hari K T

unread,
Feb 12, 2016, 2:10:04 PM2/12/16
to aur...@googlegroups.com
I did realize my problem was escaping. I then used the example from the GitHub docs and it worked fine.

I intend to integrate Aura html into my project.

Thank you for your reply,

Glad that it worked for you.
Reply all
Reply to author
Forward
0 new messages