Saturday, 26 May 2012
  3 Replies
  4K Visits
0
Votes
Undo
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? ;)
Sunday, 27 May 2012 12:20
·
#71876
0
Votes
Undo
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
Sunday, 27 May 2012 22:20
·
#71877
0
Votes
Undo
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;
Monday, 28 May 2012 08:48
·
#71878
0
Votes
Undo
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
  • Page :
  • 1
There are no replies made for this post yet.