template parameters are not working
Hi All, My project at my local pc was working when I tried 2 weeks ago. Now I tried but realized that template toolkit parameters are not set. I see following when I click on "View Page Source" <html lang="tr"> <head> <title>adopen</title> <meta charset="<% settings.charset %>"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="<% request.uri_base %>/css/bootstrap.min.css"> <script src="<% request.uri_base %>/javascripts/jquery.min.js"></script> <script src="<% request.uri_base %>/javascripts/bootstrap.min.js"></script> <link rel="stylesheet" href="<% request.uri_base %>/css/mystyle.css" /> I checked config.yml whether I changed start-end tag of template toolkit but I see that it is corrrect. # config.yml template: "template_toolkit" engines: template: template_toolkit: start_tag: '<%' end_tag: '%>' What may problem be? Last week I upgraded Ubuntu version from 15.04 to 15.10 but this should not be reason. I installed Dancer2, Template again in case upgrade caused a problem but nothing changed I am starting my project with plackup command *Kadir Beyazlı* *GSM : +90 535 821 50 00*
When I changed tag from <% %> to [% %] at .tt file it worked. But it is defined as follow at config.yml so <% %> tags should work. template: "template_toolkit" # I deleted this line engines: template: template_toolkit: start_tag: '<%' end_tag: '%>' On Sat, Jan 16, 2016 at 12:40 AM, Kadir Beyazlı <kadirbeyazli@gmail.com> wrote:
Hi All,
My project at my local pc was working when I tried 2 weeks ago. Now I tried but realized that template toolkit parameters are not set. I see following when I click on "View Page Source"
<html lang="tr"> <head>
<title>adopen</title> <meta charset="<% settings.charset %>"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="<% request.uri_base %>/css/bootstrap.min.css"> <script src="<% request.uri_base %>/javascripts/jquery.min.js"></script> <script src="<% request.uri_base %>/javascripts/bootstrap.min.js"></script> <link rel="stylesheet" href="<% request.uri_base %>/css/mystyle.css" />
I checked config.yml whether I changed start-end tag of template toolkit but I see that it is corrrect.
# config.yml template: "template_toolkit" engines: template: template_toolkit: start_tag: '<%' end_tag: '%>'
What may problem be? Last week I upgraded Ubuntu version from 15.04 to 15.10 but this should not be reason. I installed Dancer2, Template again in case upgrade caused a problem but nothing changed
I am starting my project with plackup command
*Kadir Beyazlı* *GSM : +90 535 821 50 00 <%2B90%20535%20821%2050%2000>*
-- *Kadir BeyazlıComputer Engineer* *GSM : +90 535 821 50 00*
Hi, I checked from following article that config.yml is correct for template toolkit parameters: http://search.cpan.org/~xsawyerx/Dancer2-0.157001/lib/Dancer2/Manual/Migrati... Why does not my code use '<%' and '%>' tags although they are defined at config.yml? It is working by using default tags '[%' '%]'. I am writing config.yml content again: template: "template_toolkit" engines: template: template_toolkit: start_tag: '<%' end_tag: '%>' On Sat, Jan 16, 2016 at 12:54 AM, Kadir Beyazlı <kadirbeyazli@gmail.com> wrote:
When I changed tag from <% %> to [% %] at .tt file it worked. But it is defined as follow at config.yml so <% %> tags should work.
template: "template_toolkit" # I deleted this line engines: template: template_toolkit: start_tag: '<%' end_tag: '%>'
On Sat, Jan 16, 2016 at 12:40 AM, Kadir Beyazlı <kadirbeyazli@gmail.com> wrote:
Hi All,
My project at my local pc was working when I tried 2 weeks ago. Now I tried but realized that template toolkit parameters are not set. I see following when I click on "View Page Source"
<html lang="tr"> <head>
<title>adopen</title> <meta charset="<% settings.charset %>"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="<% request.uri_base %>/css/bootstrap.min.css"> <script src="<% request.uri_base %>/javascripts/jquery.min.js"></script> <script src="<% request.uri_base %>/javascripts/bootstrap.min.js"></script> <link rel="stylesheet" href="<% request.uri_base %>/css/mystyle.css" />
I checked config.yml whether I changed start-end tag of template toolkit but I see that it is corrrect.
# config.yml template: "template_toolkit" engines: template: template_toolkit: start_tag: '<%' end_tag: '%>'
What may problem be? Last week I upgraded Ubuntu version from 15.04 to 15.10 but this should not be reason. I installed Dancer2, Template again in case upgrade caused a problem but nothing changed
I am starting my project with plackup command
*Kadir Beyazlı* *GSM : +90 535 821 50 00 <%2B90%20535%20821%2050%2000>*
--
*Kadir BeyazlıComputer Engineer* *GSM : +90 535 821 50 00 <%2B90%20535%20821%2050%2000>*
-- *Kadir BeyazlıComputer Engineer* *GSM : +90 535 821 50 00*
Hi All, Is there any prediction for this issue? On Sat, Jan 16, 2016 at 1:09 AM, Kadir Beyazlı <kadirbeyazli@gmail.com> wrote:
Hi,
I checked from following article that config.yml is correct for template toolkit parameters:
http://search.cpan.org/~xsawyerx/Dancer2-0.157001/lib/Dancer2/Manual/Migrati...
Why does not my code use '<%' and '%>' tags although they are defined at config.yml? It is working by using default tags '[%' '%]'. I am writing config.yml content again:
template: "template_toolkit" engines: template: template_toolkit: start_tag: '<%' end_tag: '%>'
On Sat, Jan 16, 2016 at 12:54 AM, Kadir Beyazlı <kadirbeyazli@gmail.com> wrote:
When I changed tag from <% %> to [% %] at .tt file it worked. But it is defined as follow at config.yml so <% %> tags should work.
template: "template_toolkit" # I deleted this line engines: template: template_toolkit: start_tag: '<%' end_tag: '%>'
On Sat, Jan 16, 2016 at 12:40 AM, Kadir Beyazlı <kadirbeyazli@gmail.com> wrote:
Hi All,
My project at my local pc was working when I tried 2 weeks ago. Now I tried but realized that template toolkit parameters are not set. I see following when I click on "View Page Source"
<html lang="tr"> <head>
<title>adopen</title> <meta charset="<% settings.charset %>"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="<% request.uri_base %>/css/bootstrap.min.css"> <script src="<% request.uri_base %>/javascripts/jquery.min.js"></script> <script src="<% request.uri_base %>/javascripts/bootstrap.min.js"></script> <link rel="stylesheet" href="<% request.uri_base %>/css/mystyle.css" />
I checked config.yml whether I changed start-end tag of template toolkit but I see that it is corrrect.
# config.yml template: "template_toolkit" engines: template: template_toolkit: start_tag: '<%' end_tag: '%>'
What may problem be? Last week I upgraded Ubuntu version from 15.04 to 15.10 but this should not be reason. I installed Dancer2, Template again in case upgrade caused a problem but nothing changed
I am starting my project with plackup command
*Kadir Beyazlı* *GSM : +90 535 821 50 00 <%2B90%20535%20821%2050%2000>*
--
*Kadir BeyazlıComputer Engineer* *GSM : +90 535 821 50 00 <%2B90%20535%20821%2050%2000>*
--
*Kadir BeyazlıComputer Engineer* *GSM : +90 535 821 50 00 <%2B90%20535%20821%2050%2000>*
-- *Kadir BeyazlıComputer Engineer* *GSM : +90 535 821 50 00*
On 01/16/2016 01:52 PM, Kadir Beyazlı wrote:
Hi All,
Is there any prediction for this issue?
Any prediction for what? Regards Racke -- Perl and Dancer Development Visit our Perl::Dancer conference 2015. More information on https://www.perl.dance.
On Sat, Jan 16, 2016 at 3:12 PM, Stefan Hornburg (Racke) <racke@linuxia.de> wrote:
On 01/16/2016 01:52 PM, Kadir Beyazlı wrote:
Hi All,
Is there any prediction for this issue?
Any prediction for what? [KB] I think I explained at first mails what I request prediction for. I am writing again:
At .tt file I am using <% and %> as template toolkit start-end tags. But .tt file is using [% %] as tag. At config.yml, I set start tag and end tag as follow: template: "template_toolkit" engines: template: template_toolkit: start_tag: '<%' end_tag: '%>' It was working when I last opend my project 2 weeks ago. But now it does not work.
Regards Racke
-- Perl and Dancer Development
Visit our Perl::Dancer conference 2015. More information on https://www.perl.dance.
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-- *Kadir BeyazlıComputer Engineer* *GSM : +90 535 821 50 00 <%2B90%20535%20821%2050%2000>*
Hi All, Because Rick replied with a new topic, I am replying to this mail too because I solved problem. I completely debugged TemplateToolkit.pm. There is change at this file but this is not the reason of my problem I tried several things and found problem! At config.yml I have following definitions, template toolkit parameters do not work! template: "template_toolkit" engines: template: template_toolkit: start_tag: '<%' end_tag: '%>' session: YAML engines: session: YAML: session_dir: /home/kadir/dancer-sessions But when I change their place (session definition first), it works: session: YAML engines: session: YAML: session_dir: /home/kadir/dancer-sessions template: "template_toolkit" engines: template: template_toolkit: start_tag: '<%' end_tag: '%>' I also Dumped config and realized that anything is not known defined before session. It is strange to me. On Sat, Jan 16, 2016 at 5:20 PM, Kadir Beyazlı <kadirbeyazli@gmail.com> wrote:
On Sat, Jan 16, 2016 at 3:12 PM, Stefan Hornburg (Racke) <racke@linuxia.de> wrote:
On 01/16/2016 01:52 PM, Kadir Beyazlı wrote:
Hi All,
Is there any prediction for this issue?
Any prediction for what? [KB] I think I explained at first mails what I request prediction for. I am writing again:
At .tt file I am using <% and %> as template toolkit start-end tags. But .tt file is using [% %] as tag. At config.yml, I set start tag and end tag as follow:
template: "template_toolkit" engines: template: template_toolkit: start_tag: '<%' end_tag: '%>'
It was working when I last opend my project 2 weeks ago. But now it does not work.
Regards Racke
-- Perl and Dancer Development
Visit our Perl::Dancer conference 2015. More information on https://www.perl.dance.
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-- Kadir Beyazlı Computer Engineer GSM : +90 535 821 50 00
-- Kadir Beyazlı Computer Engineer GSM : +90 535 821 50 00
On Tue, 2016-01-19 at 00:55 +0200, Kadir Beyazlı wrote:
But when I change their place (session definition first), it works:
session: YAML engines: session: YAML: session_dir: /home/kadir/dancer-sessions
template: "template_toolkit" engines: template: template_toolkit: start_tag: '<%' end_tag: '%>'
You've got the engines key twice. You need to combine them: engines: session: YAML: session_dir: /home/kadir/dancer-sessions template: template_toolkit: start_tag: '<%' end_tag: '%>'
Hi Andrew On Tue, Jan 19, 2016 at 1:17 AM, Andrew Beverley <andy@andybev.com> wrote:
On Tue, 2016-01-19 at 00:55 +0200, Kadir Beyazlı wrote:
But when I change their place (session definition first), it works:
session: YAML engines: session: YAML: session_dir: /home/kadir/dancer-sessions
template: "template_toolkit" engines: template: template_toolkit: start_tag: '<%' end_tag: '%>'
You've got the engines key twice. You need to combine them:
engines: session: YAML: session_dir: /home/kadir/dancer-sessions template: template_toolkit: start_tag: '<%' end_tag: '%>'
[KB] You are right. For 3 days I am challenging with this issue. I was think that "engines" parameter should be defined for each. This caused overriding earlier definitions. Now it is working :) It is a big coincidence that I faced this problem when you updated TemplateToolkit.pm which made me thinking if this update was he reason of problem :). But thanks to this problem, I completely debugged core files of Dancer2.
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-- Kadir Beyazlı Computer Engineer GSM : +90 535 821 50 00
On Tue, Jan 19, 2016 at 1:29 AM, Andrew Beverley <andy@andybev.com> wrote:
On Tue, 2016-01-19 at 01:23 +0200, Kadir Beyazlı wrote:
I completely debugged core files of Dancer2.
Not always a bad thing - you will know your way around for next time, or even for future development! [KB] You are absolutely right! Thank you very much for your help.
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-- Kadir Beyazlı Computer Engineer GSM : +90 535 821 50 00
"Andrew" == Andrew Beverley <andy@andybev.com> writes:
Andrew> On Tue, 2016-01-19 at 00:55 +0200, Kadir Beyazlı wrote:
But when I change their place (session definition first), it works:
session: YAML engines: session: YAML: session_dir: /home/kadir/dancer-sessions
template: "template_toolkit" engines: template: template_toolkit: start_tag: '<%' end_tag: '%>'
Andrew> You've got the engines key twice. You need to combine them: This should be a bug, and Dancer should just fail when this happens.
On 2016-01-19 11:05 AM, John Stoffel wrote:
This should be a bug, and Dancer should just fail when this happens.
Nah. This is happening deeper in the stack, and is simply the way YAML is parsed by the YAML libraries. And it's not even a YAM-only thing, as $ perl -MJSON -MData::Printer -E'p to_json from_json q!{ "a": 1, "a": 2 }!' would bite you in the same way. Joy, `/anick
"Yanick" == Yanick Champoux <yanick@babyl.dyndns.org> writes:
Yanick> On 2016-01-19 11:05 AM, John Stoffel wrote:
This should be a bug, and Dancer should just fail when this happens.
Yanick> Nah. This is happening deeper in the stack, and is simply the way YAML Yanick> is parsed by the YAML libraries. And it's not even a YAM-only thing, as Yanick> $ perl -MJSON -MData::Printer -E'p to_json from_json q!{ "a": 1, "a": 2 }!' Yanick> would bite you in the same way. This just makes me think that YAML is the wrong answer.
perl -wle 'use YAML; YAML::Load qq<--- { "foo": 123, "foo": 456}\n>' Actually, YAML does complain with 'YAML_LOAD_WARN_DUPLICATE_KEY' (but doesn't die, and there doesn't seem to be a way of making it die, short of violating its namespace). Anyone know where that warning goes? Daniel On 19 January 2016 at 19:10, John Stoffel <john@stoffel.org> wrote:
"Yanick" == Yanick Champoux <yanick@babyl.dyndns.org> writes:
Yanick> On 2016-01-19 11:05 AM, John Stoffel wrote:
This should be a bug, and Dancer should just fail when this happens.
Yanick> Nah. This is happening deeper in the stack, and is simply the way YAML Yanick> is parsed by the YAML libraries. And it's not even a YAM-only thing, as
Yanick> $ perl -MJSON -MData::Printer -E'p to_json from_json q!{ "a": 1, "a": 2 }!'
Yanick> would bite you in the same way.
This just makes me think that YAML is the wrong answer. _______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
participants (6)
-
Andrew Beverley -
D Perrett -
John Stoffel -
Kadir Beyazlı -
Stefan Hornburg (Racke) -
Yanick Champoux