Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter_timesince + postback-update produces template render error when "date|timesince" result have numbers #132

Closed
arjan opened this issue Sep 5, 2011 · 2 comments
Labels

Comments

@arjan
Copy link
Member

arjan commented Sep 5, 2011

From http://code.google.com/p/zotonic/issues/detail?id=127

filter timeslice is gonna crazy.

What steps will reproduce the problem?

  1. use attached usecase with existing project
  2. go to http://localhost:8000/test and click to link. It will cause some sort of AJAX update

What is the expected output? What do you see instead?

%% If Date difference for filter_timesince near 0 all is rendered OK:

=INFO REPORT==== 19-Nov-2010::17:20:43 ===
DEBUG: filter_timesince:28 <<"now">>

%% Time slice difference is still very small. All again renders ok:

=INFO REPORT==== 19-Nov-2010::17:20:51 ===
DEBUG: filter_timesince:28 [<<"moments">>," ",<<"ago">>]

%% And date diff goes to numbers of seconds... i have error:
=INFO REPORT==== 19-Nov-2010::17:20:57 ===
DEBUG: filter_timesince:28 [[49,52,32|<<"seconds">>]," ",<<"ago">>]

=ERROR REPORT==== 19-Nov-2010::17:20:57 ===
webmachine error: path="/postback"
{error,{error,function_clause,
[{lists,splitwith,
[#Fun<z_render.0.87501545>,<<"seconds">>," 41"]},
{z_render,render,2},
{z_render,render,2},
{z_render,render_to_iolist,2},
{resource_stars_comments,event,2},
{resource_postback,process_post,2},
{webmachine_resource,resource_call,3},
{webmachine_resource,do,3}]}}

What version of the product are you using? On what operating system?
0.5 hg

Issue is not reproduceable during standart (non-AJAX) rendering actions.
Issue goes out if i remove timesince-filter.

@arjan
Copy link
Member Author

arjan commented Sep 5, 2011

This issue was closed by revision 253e877b66.

_Commented on Google Code by _profile.url**

@arjan
Copy link
Member Author

arjan commented Sep 5, 2011

I have successfully reproduced the problem.

Seems to be a weird list [49,32|<<"some binary">>]

_Commented on Google Code by _profile.url**

@arjan arjan closed this as completed Sep 5, 2011
mworrell added a commit that referenced this issue Sep 5, 2011
AlainODea pushed a commit to AlainODea/zotonic that referenced this issue Sep 6, 2011
ddeboer pushed a commit to ddeboer/zotonic that referenced this issue May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant