greenlaw110 / greenscript

A tool help web developers manage javascript/css rendering, including minimize and dependence management
42 stars 24 forks source link

Is it only me ? The template tags/greenscript/css.tag does not exist. #5

Closed orefalo closed 13 years ago

orefalo commented 13 years ago

application.conf

module.greenscript=${play.path}/modules/greenscript-1.2b
greenscript.minimize=true
%prod.greenscript.minimize=true
greenscript.compress=true
%prod.greenscript.compress=true

My application uses a tag defined as such

{ greenscript.css 'forms.css'/}

 <input type="text" id="${_id}" name="${_id}" />

It barfs with "The template tags/greenscript/css.tag does not exist." I don't get it.. the module is installed (of course) !

orefalo commented 13 years ago

tried with 1.2a, some result...

I used the press plugin before, are you sure you are not missing an entry in route ?

orefalo commented 13 years ago

tried with 1.2a, some result...

I used the press plugin before, are you sure you are not missing an entry in route ?

greenlaw110 commented 13 years ago

Never meet this issue. Can you check your filesystem ${play.path}/modules/greenscript-1.2b/app/views/tags/greenscript ? There should be a file named "css.html". If the file is there then it's probably due to other playframework configurations. You can use the following command to copy the tag files to your app folder: play greenscript:cp -a . And then use #{css ...} and #{js ...} instead of #{greenscript.css ..} and #{greenscript.js ...}

greenlaw110 commented 13 years ago

locating template tags is part of class loading work, it's not relevant to routing

orefalo commented 13 years ago

let me try your stuff, but he is my latest finding

it works fine from an HTML.. not from a TAG

orefalo commented 13 years ago

arf closed the issue by mistake

orefalo commented 13 years ago

yep, it's there

greenscript-1.2b $cd app/views/tags/greenscript/ greenscript $ls -l total 48 -rw-r--r-- 1 Olivier staff 88 Jan 12 13:59 closeTag.html -rw-r--r-- 1 Olivier staff 212 Jan 12 13:59 css.html -rw-r--r-- 1 Olivier staff 2343 Jan 12 13:59 gs.html -rw-r--r-- 1 Olivier staff 224 Jan 12 13:59 js.html -rw-r--r-- 1 Olivier staff 125 Jan 12 13:59 openTag.html -rw-r--r-- 1 Olivier staff 664 Jan 12 13:59 output.html

orefalo commented 13 years ago

I turned off, all the other plugins in my app.. GS is the only one.. still getting the same issue.. anyways, will try the cp -a

orefalo commented 13 years ago

even with the cp -a, it doesn't work....

I had to rename .html to .tag by the way

I still get a The template tags/greenscript/gs_.tag does not exist.

hum... wait... I think I know what it is... the file should be name '*.tag' !!!

orefalo commented 13 years ago

nope.. didn't change anything... desperate..

greenlaw110 commented 13 years ago

Okay, I will check it

greenlaw110 commented 13 years ago

I have just added an new sample test app called "use-gs-in-tags". I can't reproduce your issue in this new play app. Can you download this app and check it? or can you send me a sample app to reproduce the issue to my email account: greenlaw110@gmail.com

orefalo commented 13 years ago

downloaded and tried - it works... I really don't understand why my app is not working... I will scratch my head again and again and use this one as a sample.

This is not related but, I had to change the sample app application.conf to

module.greenscript=../..

module.greenscript=${play.path}/modules/greenscript-1.2b

greenlaw110 commented 13 years ago

Can you use tags from other module in your app? like #{crud.textField /}

orefalo commented 13 years ago

ok, been trying to find the issue over the last 3 hours... here is my project (check your mail). I REALLY don't understand why it fails. it must be so stupid that I don't see the error.

EDIT: forgot to mention, in the sample I sent you - only the INPUT link is valid.. but it fails... greenscript/css.tag not found

greenlaw110 commented 13 years ago

use ".html" instead of ".tag" as the suffix of tag file solves the issue

orefalo commented 13 years ago

thank you, I can live with .html for my tags

.tag seems to be like an issue with Play.

Olivier

orefalo commented 13 years ago

You should read this, https://groups.google.com/d/msg/play-framework/Ij_4LoCu6uM/OUYDI_kAWCwJ

I believe your tags should be made generic (renamed to .tag)

UPDATE: No! it's fine the way it is... greenscript is bound to HTML, thank you