csv import does not create entries in catmap
We are looking for developers, forum moderators and translators for this project.
If you would like to help out then please add a message in this forum.
If you would like to help out then please add a message in this forum.
csv import does not create entries in catmap
by abgoesnuts » Sat May 26, 2012 8:39 pm
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?
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?
- abgoesnuts
- Gold Members
- Posts: 3
- Joined: Tue Apr 24, 2012 7:53 am
Re: csv import does not create entries in catmap
by Geraint » Sun May 27, 2012 11:20 am
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
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
------------
JEvents club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits.
Join the JEvents club today!
JEvents club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits.
Join the JEvents club today!
-

Geraint - Posts: 30507
- Joined: Fri Feb 15, 2008 6:14 pm
Re: csv import does not create entries in catmap
by abgoesnuts » Sun May 27, 2012 9:20 pm
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 #_
translated the joomla table prefix to #_
- Code: Select all
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;
- abgoesnuts
- Gold Members
- Posts: 3
- Joined: Tue Apr 24, 2012 7:53 am
Re: csv import does not create entries in catmap
by Geraint » Mon May 28, 2012 7:48 am
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
I'll also clear the map table when deleting the event.
Geraint
------------
JEvents club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits.
Join the JEvents club today!
JEvents club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits.
Join the JEvents club today!
-

Geraint - Posts: 30507
- Joined: Fri Feb 15, 2008 6:14 pm
4 posts
• Page 1 of 1
Return to Contribute to JEvents
Who is online
Users browsing this forum: No registered users

