Forums / Setup & design / ezstarrating wint "plain site" type in eZ 4.2

ezstarrating wint "plain site" type in eZ 4.2

Author Message

André R.

Thursday 29 October 2009 11:45:22 am

And John: Since the rating is saved, there is probably a javascript error happening when rating call returns data, so any javascript error would help here (if it is triggered). Use firefox + firebug to get most meaningful errors (IE is no good at this among other things..).
And are you using default yui3 code or did you change to jquery code (in ezjscore.ini preferedLibrary setting)?

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

John Smith

Friday 30 October 2009 1:35:18 am

@Pascal: Much appreciated. Cheers. Please let me know the outcome.

@Andre: I have not changed anything, just default setting with yui3. I exactly followed what pascal suggested in his article but on 4.0.1

John Smith

Friday 30 October 2009 7:35:02 am

Tried again with a fresh install 4.0.1 (Plain_site). Nothing on site except one folder and article.

The header html is something like below, and I can see all the necessary files are loading as mentioned by pascal. STILL SAME PROBLEM, the page is not refreshing after I click on the Stars.

PASCAL: I am waiting for your outcome.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB" lang="en-GB"> 
<head> 
<style type="text/css"> 
@import url("/design/base/stylesheets/core.css");
@import url("/design/base/stylesheets/site.css");
@import url("/stylesheets/t02/site-colors.css");
@import url("/design/base/stylesheets/classes.css");
@import url("/stylesheets/t02/classes-colors.css");
@import url("/design/standard/stylesheets/debug.css");
@import url("/extension/ezstarrating/design/standard/stylesheets/star_rating.css");
</style> 
<script language="JavaScript" type="text/javascript" src="/design/standard/javascript/tools/ezjsselection.js"></script>
<script language="JavaScript" type="text/javascript" src="/design/plain_site/javascript/yahoo-dom-event.js"></script> 
<!--[if lt IE 6.0]>
<style>
div#maincontent-design { width: 100%; } /* This is needed to avoid width bug in IE 5.5 */
</style>
<![endif]--> 
<title>Test / News / eZ Publish - Plain site</title> 
<meta name="Content-Type" content="text/html; charset=utf-8" /> 
<meta name="Content-language" content="en-GB" /> 
<meta name="author" content="eZ Systems" /> 
<meta name="copyright" content="eZ Systems" /> 
<meta name="description" content="Content Management System" /> 
<meta name="keywords" content="cms, publish, e-commerce, content management, development framework" /> 
<meta name="MSSmartTagsPreventParsing" content="TRUE" /> 
<meta name="generator" content="eZ Publish" />  
<link rel="Shortcut icon" href="/design/standard/images/favicon.ico" type="image/x-icon" /><link rel="Alternate" href="/ps/layout/set/print/news/test" media="print" title="Printable version" /> 
<script language="javascript" type="text/javascript" src="http://yui.yahooapis.com/3.0.0/build/yui/yui-min.js" charset="utf-8"></script> 
<script language="javascript" type="text/javascript" src="/var/plain_site/cache/public/javascript/200b02b41a6af8b8fe00c09c07d65eb6.js" charset="utf-8"></script> 
</head>
<body>

Pascal France

Friday 30 October 2009 8:28:34 am

Hi John,

Well, I just installed a new 4.01 with type Plain (without ezwebin and ezflow).
Then I followed my Doc line by line and the verdict is........ all works perfectly !
Here is the article:
http://linuxorable.fr/ez401plainsite/index.php/test/My-New-article-with-Star-Rating

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

John Smith

Friday 30 October 2009 9:21:08 am

It is shame that it is not working on my end.

Have you done any changes in the "mod_rewrite" rules or nothing at all just followed your article.

Mine is below:

 RewriteEngine On
        RewriteRule content/treemenu/? /index_treemenu.php [L]
        Rewriterule ^/var/storage/.* - [L]
        Rewriterule ^/var/[^/]+/storage/.* - [L]
        RewriteRule ^/var/cache/texttoimage/.* - [L]
        RewriteRule ^/var/[^/]+/cache/(texttoimage|public)/.* - [L]
        RewriteRule ^/var/([^/]+/)?cache/public/.* - [L]
        RewriteRule ezjscore/call/ /index_ajax.php [L]
        Rewriterule ^/design/[^/]+/(stylesheets|images|javascript)/.* - [L]
        Rewriterule ^/share/icons/.* - [L]
        Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|flash|images|lib|javascripts?)/.* - [L]
        Rewriterule ^/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
        RewriteRule ^/packages/styles/.+/thumbnail/.* - [L]
        RewriteRule ^/favicon\.ico - [L]
        RewriteRule ^/robots\.txt - [L]
        RewriteRule ^/phpinfo\.php - [L]

If possible please pass on your rewrite rules....

Pascal France

Friday 30 October 2009 9:52:50 am

Here is my .htaccess for http://annuecobio.fr which is a remote hoste:

DirectoryIndex index.php
 
RewriteEngine On
RewriteRule ^var/storage/.* - [L]
RewriteRule ^var/[^/]+/storage/.* - [L]
RewriteRule ^var/cache/texttoimage/.* - [L]
RewriteRule ^var/[^/]+/cache/texttoimage/.* - [L]
RewriteRule ^design/[^/]+/(stylesheets|images|imagespl|javascript)/.* - [L]
RewriteRule ^share/icons/.* - [L]
RewriteRule ^sitemaps/.* - [L]
RewriteRule ^extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
RewriteRule ^extension/tracewatch/.* - [L]
RewriteRule ^packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
RewriteRule !(\.(gif|jpe?g?|png|css|js|swf|html?)|var(.+)storage.pdf(.+)\.pdf)$ index.php

For the test that I done with eZP 4.0.1, I didn't used any .htaccess because it's my local machine.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

André R.

Friday 30 October 2009 2:08:18 pm

       RewriteRule ezjscore/call/ /index_ajax.php [L]

I guess you also copied index_ajax.php to eZ Publish root, as the ratings are saved.
No other idea then trying to debug the javascript end of it.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Pascal France

Saturday 31 October 2009 2:56:23 am

Hi André,

It's strange because I don't use your rewrite rule and there is no index_ajax.php on the root of the 4.0.1 test site I installed and all works fine.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

John Smith

Saturday 31 October 2009 3:38:42 am

Hi guys,

Yeah it works with or withou index_ajax.php. In my case it was the right environment. I was using php5.1.2 with no JSON extension. This morning tried on new server with PHP 5.2.x / JSON extension / version 4.01 / plain_site. It all works in first attempt.

Would like to thank you guys for your time and effort.

Cheers,

eZ debug

Timing: Jan 18 2025 16:27:07
Script start
Timing: Jan 18 2025 16:27:07
Module start 'content'
Timing: Jan 18 2025 16:27:08
Module end 'content'
Timing: Jan 18 2025 16:27:08
Script end

Main resources:

Total runtime0.9568 sec
Peak memory usage4,096.0000 KB
Database Queries214

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0110 588.3672180.8125
Module start 'content' 0.01100.8171 769.1797642.7266
Module end 'content' 0.82810.1286 1,411.9063363.8516
Script end 0.9567  1,775.7578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.4227210.0002
Check MTime0.00160.1637210.0001
Mysql Total
Database connection0.00200.211110.0020
Mysqli_queries0.870390.96572140.0041
Looping result0.00230.24132120.0000
Template Total0.914495.620.4572
Template load0.00220.224820.0011
Template processing0.912295.341120.4561
Template load and register function0.00010.010110.0001
states
state_id_array0.00240.255610.0024
state_identifier_array0.00170.172820.0008
Override
Cache load0.00190.1980460.0000
Sytem overhead
Fetch class attribute can translate value0.00090.098840.0002
Fetch class attribute name0.00160.1640100.0002
XML
Image XML parsing0.00100.104240.0002
class_abstraction
Instantiating content class attribute0.00000.0020110.0000
General
dbfile0.00210.2174280.0001
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 32
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs