Jul 05, 2009, 11:23 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Read what MODx Developers say: MODx Dev. Blogs
Pages: [1] 2   Go Down
  Print  
Author Topic: jot.html placeholders not doing anything?  (Read 4832 times)
0 Members and 1 Guest are viewing this topic.
The Man Can!
Testers
*
Posts: 325



WWW
« on: Mar 07, 2007, 09:15 PM »

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.
Logged

Need MODx Ecommerce? Try FoxyCart!
myan24
Full Member
***
Posts: 117

I love MODx!


« Reply #1 on: Mar 18, 2007, 12:40 PM »

I can't help, but I can confirm I'm having exactly the same trouble. Did you get this sorted?
Logged
Errant
Jr. Member
*
Posts: 18


« Reply #2 on: Mar 18, 2007, 05:02 PM »

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 :] 
Logged

"Sorry for my english"
YankeeDeuce
Jr. Member
*
Posts: 43


I love MODx!


WWW
« Reply #3 on: Mar 19, 2007, 12:07 AM »

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.
Logged
myan24
Full Member
***
Posts: 117

I love MODx!


« Reply #4 on: Mar 19, 2007, 03:58 PM »

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

Logged
ER
Full Member
***
Posts: 150



WWW
« Reply #5 on: Mar 20, 2007, 09:12 AM »

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+]
Logged
The Man Can!
Testers
*
Posts: 325



WWW
« Reply #6 on: Mar 24, 2007, 02:51 AM »

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.
Logged

Need MODx Ecommerce? Try FoxyCart!
MEGU
Committed to MODx
*****
Posts: 873



WWW
« Reply #7 on: Jul 03, 2007, 03:49 AM »

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: Jul 03, 2007, 09:17 PM by MEGU » Logged
foniksonik
Member
**
Posts: 60


I love MODx!


« Reply #8 on: Oct 17, 2007, 02:22 AM »

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...
Logged
The Man Can!
Testers
*
Posts: 325



WWW
« Reply #9 on: Oct 17, 2007, 02:43 AM »

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.
Logged

Need MODx Ecommerce? Try FoxyCart!
foniksonik
Member
**
Posts: 60


I love MODx!


« Reply #10 on: Nov 17, 2007, 01:26 AM »

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.
Logged
yoomai
Sr. Member
****
Posts: 261



WWW
« Reply #11 on: Mar 05, 2008, 07:29 AM »

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  :-(
Logged

davidm
MODx evangelist
Marketing & Design Team
*
Posts: 7,026


Software is like sex, it's better when it's free !


WWW
« Reply #12 on: Mar 05, 2008, 07:35 AM »

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
Logged

.: 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
yoomai
Sr. Member
****
Posts: 261



WWW
« Reply #13 on: Mar 05, 2008, 10:03 AM »

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 :-)
Logged

davidm
MODx evangelist
Marketing & Design Team
*
Posts: 7,026


Software is like sex, it's better when it's free !


WWW
« Reply #14 on: Mar 05, 2008, 10:32 AM »

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...
Logged

.: 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
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!