I changed that and have begun testing.
Already experiencing some breakage
.
When using:
[!star_rating? &docID=`[+id+]` &useCookie=`true` &cssFile=`assets/css/snippets/star-rating.css` !]
ModX breaks,and I get this:
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object
Error type/ Nr.: Warning - 2
File: /var/www/modx/assets/snippets/star_rating/rating.class.php
Line: 297
Line 297 source: if (array_key_exists($this->passedId, $cArray)) {
Parser timing
MySQL: 0.0112 s (11 Requests)
PHP: 0.0882 s
Total: 0.0994 s
However, it works fine without the $useCookie=`true` paramater.
BUT,if I vote once on a useCookie page enabled,even if I modify the snippet’s call,I still get an error,no matter what.(Edit:Actually , if I delete some of the "starRating" cookies, the page loads fine again.)
I’ve found some interesting things.
First of all:
Just reloading a page that I voted on before (and has multiple star-rating calls) I find that it resets the following cookie:
name:cssStarRating13
Content:novote
[...]
and some other details.As you’ve probably noticed ,13 is the pid from the previous vote. But: I voted ,got the error,changed the call and refreshed the page...
Also,this cookie is constantly being set(without any voting!!):
name:starRating
content:a%3A1%3A%7Bi%3A13%3Ba%3A1%3A%7Bi%3A1%3Bs%3A1%3A%221%22%3B%7D%7D
I have around 3 instances of them active , and they only differ by the time .
Also,did I mention that if I get the nasty error page ,and just delete the cookies and refresh the error page,around 3-4 cookies of the last type appear (and their timestamp differs by 20-30 minutes each
) and ofcourse , one of the starRating13 type
. [maybe something is left unset ?]
Btw,I also have a LOT of session cookies(or whatever they are called):
name:SN45561233b0676
Content:56b457fba364e6e5f2e5fb3f6d8ab227
[...] Some differ by path,some by nothing ( I have about 10 of these :| ).
I’ll be doing some more testing tomorrow,and try to rephrase my explanations
.
PS: Using Firefox 2.0,haven’t tested with anything else yet .