Closed GoogleCodeExporter closed 8 years ago
I cannot reproduce this.
Created 5 products. Created 5 top level tags (you didn't specified which kind of
tags). Each product was associated with four tags. In each tag, appears four
products.
The find_by_tags method appears fine to me, is a method where you pass an array
of
tag ids and it will return the products that are in ALL of them. this is the
reason
of the group by clause comparing the count with the number of tags passed.
Is you trying to associate things any different than that? Like associating
products
with child tags without marking its top level tags too?
Original comment by edmundo...@gmail.com
on 1 Jun 2008 at 9:26
Yes, I associate products with child tags without marking its top level tags
too.
and I am using chinese language. pls see if there is some language supporting
problem
Original comment by liuyin...@gmail.com
on 5 Jun 2008 at 8:24
I cannot reproduce it in any way. But I don't have a Mac and don't use my OS in
chinese.
I yet don't know how did you created and associated your products and tags
(simply
saying that you did in another way is not enough), normally is more usefull
pick up a
clean system and describe a scenario with more details.
In any situation it works?
You can take a look at the MySQL products_tags table and see if the relations
are right.
The system have automate tests that test relations between products and tags,
you can
try it:
$ ruby
./vendor/plugins/substruct/test/functional/admin/products_controller_test.rb
It shoud show something like that.
Loaded suite
./vendor/plugins/substruct/test/functional/admin/products_controller_test
Started
...................
Finished in 7.082522 seconds.
19 tests, 139 assertions, 0 failures, 0 errors
Original comment by edmundo...@gmail.com
on 7 Jun 2008 at 1:43
I'm getting this same error. It started when I switched from using mysql 4 to
mysql5.
The reason I switched is that I was getting a large number of "Mysql::Error:
Lost
connection to MySQL server during query" errors.
Original comment by patrickb...@gmail.com
on 9 Jun 2008 at 8:32
So apparently this error happens if you are navigating to a tag that does not
exist.
Original comment by patrickb...@gmail.com
on 9 Jun 2008 at 8:41
Im using MySQL 5 in Ubuntu (by months) and don't have that problem.
edmundo@toshibau305:~$ dpkg -l | grep mysql-server-
ii mysql-server-5.0 5.0.45-1ubuntu3.3 MySQL database server binaries
Can you explain how a tag that does not exist can have a link that can be
clicked in
the menu and make all products appear?
I still cannot reproduce it.
Original comment by edmundo...@gmail.com
on 9 Jun 2008 at 9:44
The MySQL version turned out to have nothing to do with this problem. (The lost
connection problem had to do with the bindings and was resolved by running
apt-get
install libmysql-ruby1.8)
To answer your question:
A tag that does not exist does not have a link that can be clicked. After I
switched
from MySQL 4 to 5 I created a new db. Then ran db:bootstrap and migrate. Then
went
back to the browser and hit reload. It happened to be on
'store/show_by_tags/tagname'
where tag name no longer exists.
So, if you want to reproduce this error, navigate to
store/show_by_tags/sometagnamethatdoesnotexist. Unless of course you've caught
this
exception and rerouted.
Original comment by patrickb...@gmail.com
on 9 Jun 2008 at 10:15
No, that's ok.
Thats the point, its a problem with the store controller not handling a non
existent
tag when using the show_by_tags action. It is a problem, but dont have anything
to do
with this issue.
For me it raises an ActiveRecord::StatementInvalid exception.
Fixed in issue 96.
The current one, I cannot reproduce.
Original comment by edmundo...@gmail.com
on 10 Jun 2008 at 1:47
Thanks for the info and the patch. Would you like me to delete my comments
above as
they do not apply to this issue?
Original comment by patrickb...@gmail.com
on 10 Jun 2008 at 5:39
Im not the developer of the project. But I don't think so. When deleted things
changes from wrong to nonsense. If not reproductible this issue will be marked
as
invlid and closed in the end anyway.
Original comment by edmundo...@gmail.com
on 10 Jun 2008 at 6:51
Good discussion, glad this resolved. Thanks Edmundo again for lending a hand.
Original comment by subim...@gmail.com
on 15 Jun 2008 at 7:46
Original issue reported on code.google.com by
liuyin...@gmail.com
on 31 May 2008 at 11:24