Topic: jot.html placeholders not doing anything?  (Read 7226 times)

Pages: [1] 2  All   Go Down

#1: 7-Mar-2007, 09:15 PM

Testers

The Man Can!
Posts: 340

WWW
I'm guessing this is a really stupid mistake on my part, but I cannot get the [+jot.html+] placeholders to work for the life of me.

My call (complete just in case, line breaks for readability):

Code:
[!Jot? &subscribe=`1` &subjectSubscribe=`[Gateway] Comment subscription for "[*pagetitle*]"`
&captcha=`1` &badwords=`{{commentBadWords}}` &bw=`2` &css=`1`
&cssFile=`assets/templates/gateway.jot.css`
&sortby=`createdon:a` &numdir=`0`
&guestname=`anonymous` &postdelay=`6` &pagination=`0`
&placeholders=`1` &output=`0` &debug=`0`
&tplForm=`commentsForm` &tplComments=`commentsComment` &customfields=`name` !]

[+jot.html.moderate+]
[+jot.html.comments+]
[+jot.html.form+]
[+jot.html.navigation+]

Generates nothing. If I do placeholders=0 and output=1 it's fine. If I do debug=1 it looks as if it should be working:

Code:
jot.html.comments = <a name="jcc9632ae882"></a>

<div class="commentRow jot-row-alt ">
    <div class="jot-mod">
       
       
    </div><!-- .jot-mod -->

    <div class="commentTitleRow">
        <span class="commentAuthor">
etc...

But I'm totally clueless as to why output=0 and placeholders=1 doesn't work.
I'm using 1.1.2.

Thoughts? I've been fighting this on and off for 2 weeks with no progress.
Thanks.
Need MODx Ecommerce? Try FoxyCart!

#2: 18-Mar-2007, 12:40 PM

myan24
Posts: 122

I love MODx!

I can't help, but I can confirm I'm having exactly the same trouble. Did you get this sorted?

#3: 18-Mar-2007, 05:02 PM

Errant
Posts: 18

I have same problem too. Don't know the reason (was too lazy to search for it Wink ), but one possible quick workaround is to modify jot parser, in assets/snippets/jot. Not very elegant or secure way, of course. Plus you need some basic knowledge in PHP or a couple of logic :] 
"Sorry for my english"

#4: 19-Mar-2007, 12:07 AM


YankeeDeuce
Posts: 43

I love MODx!

WWW
Code:
[[Jot? &customfields=`name,email` &subscribe=`0` &pagination=`10` &badwords=`{{Badwords}}` &canmoderate=`Admins`
&sortby=`createdon:a` &numdir=`0` &tplComments=`JotComments` &output=`0` &placeholders=`1` &captcha=`2` ]]
[+jot.html.navigation+]
[+jot.html.comments+]
[+jot.html.moderate+]
[+jot.html.form+]
Here is the call I am using (line breaks for readability as well), works for me. Only thing I can see that's different really is I have &output=`0` before &placeholders=`1` and my call is uncached.

#5: 19-Mar-2007, 03:58 PM

myan24
Posts: 122

I love MODx!

The order of output and placeholders doesn't seem to make any difference, but calling the snippet uncached does. Works! Thanks man!!

#6: 20-Mar-2007, 09:12 AM


ER
Posts: 150

WWW
I just tried YankeeDeuce's code, which didn't work until I removed the `output` & `tplComments` calls.  I left mine uncached, but I'm not sure that mattered.  Here's my code that worked for me (which was really Yankee's code):

Code:
[!Jot? &customfields=`name,email` &subscribe=`1` &pagination=`4` &badwords=`{{Badwords}}` &canmoderate=`Site Admins` &sortby=`createdon:a` &numdir=`0` &placeholders=`1` &captcha=`2` !]
[+jot.html.navigation+]
[+jot.html.comments+]
[+jot.html.moderate+]
[+jot.html.form+]

#7: 24-Mar-2007, 02:51 AM

Testers

The Man Can!
Posts: 340

WWW
I was having no luck, regardless of whether it was called cached or uncached, until I tried moving the Jot call out of the chunk and into my template.

So, this didn't work:
Template( Chunk( Jot + Placeholders ) )

And this doesn't work:
Template( Placeholders + Chunk( Jot ) )

But this does work:
Template( Jot + Chunk( Placeholders ) )

And so does this:
Template( Jot + Placeholders )

Hopefully that makes sense. Basically, it looks like Jot can't be in a chunk with the placeholders. Not sure if this is a bug or a recursion limitation in the parser, but I'm glad I figured it out. (And I'm glad that the uncached call worked for others.)

Odd.
Need MODx Ecommerce? Try FoxyCart!

#8: 3-Jul-2007, 03:49 AM


MEGU
Posts: 890

WWW
Dear all,
and I thank very much your great work, Jot!

I have also same trouble.
I want to confirm about this trouble.

I have installed PHx plugin.
And for example, I write as following.
Code:
[!Jot? &output=`0` &placeholders=`1`!]
[+jot.html.comments+]
[+jot.html.form+]

In this case, nothing is displayed.

NEXT:
Invalidate PHx plugin.
Write as follwing.
Code:
[!Jot? &output=`0` &placeholders=`1`!]
[+jot.html.comments+]
[+jot.html.form+]
Each Items are displayed.

NEXT2:
Validate PHx plugin.
Write as follwing.
Code:
[[Jot? &output=`0` &placeholders=`1`]]
[+jot.html.comments+]
[+jot.html.form+]
Each Items are displayed.

From these result, when PHx is valid, "Jot" must call with cache-style. ( = [[...]]), I think.
Is this specifications?

I would like to save document with cache.
So I will need to call Jot with non-cache-style( = [!...!]).
But when PHx plugin is valid, I can not use "[+jot.html.etc+]",   with the above.
Can I solve this problem?

Sincerely yours,
---*---*---*---*---*---
P.S.
about version:
 * MODx 0.9.5
 * Jot 1.1.2
 * PHx 2.1.2
« Last Edit: 3-Jul-2007, 09:17 PM by MEGU »

#9: 17-Oct-2007, 02:22 AM


foniksonik
Posts: 63

I love MODx!

I came to the same conclusion as Megu... this is an old thread, relatively... has anyone solved this? or are we waiting for an official update to either Jot or PHX?

Maybe just remove the PHX parser class from JOT when PHX is installed? could be a conflict of some sort...

#10: 17-Oct-2007, 02:43 AM

Testers

The Man Can!
Posts: 340

WWW
Only way I've been able to get around this is to play around with the page cache settings (uncached, I think) and the snippet cache settings.  Not the best, but it has worked whenever I've run into this issue (which is almost every time I use Jot). I doubt we'll see any movement on a fix for this before 0.9.7, but I could be wrong.
Need MODx Ecommerce? Try FoxyCart!

#11: 17-Nov-2007, 01:26 AM


foniksonik
Posts: 63

I love MODx!

EH... just wanted to respond on this one. The Man Can is correct... call the page in question uncached and call the jot snippet cached... works fine as long as you're okay with page content being uncached.

#12: 5-Mar-2008, 07:29 AM


yoomai
Posts: 263

WWW
Same issue here. If PHx is installed = no costum display order with JOT Placeholders. So I had to disable PHx, because I can't ask my costumers to disable documents caches manually for every blog article  :-(

#13: 5-Mar-2008, 07:35 AM

Marketing & Design Team

davidm
MODx evangelist
Posts: 7,073

The best way to predict the future is to invent it

WWW
I have been experiencing the same issue but it's clearly stated in the Jot documentation :

Quote from: Jot Wiki Page
Best practise for including comments

The best practise for comment-enabling your documents is to create a chunk for each type of Jot call you will use. Include each chunk in a template and link it to your articles. Try to avoid direct jot calls in the content field of a document (even if it's a chunk). http://wiki.modxcms.com/index.php/Jot

If it's of any interrest, the way I went around the issue is have two Jot calls, one for comments and one for the form (it's not as granular a control as placeholders but it's enough for me...) :

 
Code:
            [!Jot? &action=`comments` &subscribe=`1` &pagination=`10` &css=`0`!]

             [!Jot? &action=`form` &tplForm=`FormulaireCommentaires` &css=`0` &captcha=`2` &notify=`2`!]

BTW, as you can see, I call Jot uncached on a cached page and it works....
I have PHx installed
.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez à l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.67 - PHP 5.2.8 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net

#14: 5-Mar-2008, 10:03 AM


yoomai
Posts: 263

WWW
David, the problem occurs only if u use the &placeholders and &output params. But...
Quote
If it's of any interrest, the way I went around the issue is have two Jot calls, one for comments and one for the form
... you made my day! Man, sometimes I'm so stupid. Very nice :-)

#15: 5-Mar-2008, 10:32 AM

Marketing & Design Team

davidm
MODx evangelist
Posts: 7,073

The best way to predict the future is to invent it

WWW
Or not stupid enough Wink

I admit I am lazy - thus I always look for the least path of resistance - and it's not the most elegant thing to do, but it works Tongue
Glad I could help...

Anyway, I am still very interrested in explanations or fix to get placeholders to work !

David, the problem occurs only if u use the &placeholders and &output params.

Yes I know I banged my head with this... my understanding is you have to set &output=`0` when you use &placeholder else you get double output so to speak...
.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez à l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.67 - PHP 5.2.8 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net

#16: 5-Mar-2008, 12:16 PM

Testers

The Man Can!
Posts: 340

WWW
So I had to disable PHx, because I can't ask my costumers to disable documents caches manually for every blog article  :-(
You could probably switch the default for new documents to uncached if need be. That's actually what I'd do. Slightly hacky, but a pretty easy hack.
Need MODx Ecommerce? Try FoxyCart!

#17: 17-Aug-2009, 08:42 AM

Testers

ganeshXL
Posts: 2,014

true is true

WWW
This is frustrating... I tried all possible combinations discussed here, but I can't use Jot-placeholders. I placed the Jot-call and the placeholders directly in the template (instead of a dedicated chunk), but I don't see ANYTHING then...

I really need to use placeholders, since the client wants to list the comments first, and only show the form at the bottom of the page.

#18: 17-Aug-2009, 09:05 AM

Testers

Lammikko
Posts: 404

WWW
Use parameter &action to select what to display, call Jot twice with &action=`form` &action=`comments`:

Control what to display:
  • count-comments
  • count-subscriptions
  • comments
  • form
QuickManager+ Support | Download

Mikko Lammi, Owner at Maagit

#19: 13-Sep-2009, 08:25 AM

JimKillock
Posts: 34

WWW
I'm getting a second problem using this wprk around:

When a comment is added, it doesn't appear immediately, but only on a manual refresh.

#20: 17-Oct-2009, 09:14 AM

HrEsben
Posts: 20

I can't seem to find any parameters for controlling the templates.

My Jot call looks like this (inspired by previous reply):
Code:
[!Jot? &action=`comments` &tplForm=`kommentarTpl` &subscribe=`1` &pagination=`10` &css=`0`!]<br />
[!Jot? &action=`form` moderated=`0` &css=`0` &captcha=`2` &notify=`2`!]

But I don't know how to design the template chunk kommentarTpl.
Can anyone help me in this matter?
I have looked in the Wiki, but it does'nt quite seem to cover this.

Thanks in advance!
Pages: [1] 2  All   Go Up
0 Members and 1 Guest are viewing this topic.