By abgoesnuts on Saturday, 26 May 2012
Replies 3
Likes 0
Views 3.6K
Votes 0
The multi category feature (component release 2.2.0beta3) uses the new catmap table. However when importing from a csv file the categories entry is put in the categories column of the #__jevents_vevdetail table and no entries are created in the catmap table. Without those entries the events don't show up in the front end.

As a workaround I created a trigger on the #__jevents_vevent table to create these entries. This worked and confirmed my analysis. I assume you want to fix this bug?
I thought I'd found all the places where all the 'multi' vs 'single' category events would need to change. It looks as though I missed this one

Can you give me your code changes and I'll make sure they are incorporated into the next release?

thanks for the detective work!

Geraint
·
12 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
I hope this is usefull. Like I said, I created a workaround using a database trigger. My core skills are java, jsf, (PL)/SQL. I'm just starting out with Joomla and php.

translated the joomla table prefix to #_


create trigger event_after_insert after
insert
on
#__jevents_vevent for each row begin
-- code:
if not exists
(
select
1
from
#__jevents_catmap cm
where
cm.evid = new.ev_id
and cm.catid = new.catid
)
then
insert
into
#__jevents_catmap
(
evid,
catid,
ordering
)
values
(
new.ev_id,
new.catid,
0
) ;

end if;
end;
·
12 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
thanks for this - I have now implemented php code that will set the multiple categories (if set) - this will be in the next release of JEvents 2.2.

I'll also clear the map table when deleting the event.

Geraint
·
12 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post