J and Beyond 2013 | An International Joomla! Conference - May 31st - 2nd, 2013, Noordwijkerhout, The Netherlands
It is currently Sun May 19, 2013 10:01 pm

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.

csv import does not create entries in catmap

Postby 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? ;)
abgoesnuts
Gold Members
Posts: 3
Joined: Tue Apr 24, 2012 7:53 am

Re: csv import does not create entries in catmap

Postby 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
------------
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!
User avatar
Geraint
Posts: 30518
Joined: Fri Feb 15, 2008 6:14 pm

Re: csv import does not create entries in catmap

Postby 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 #_

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

Postby 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
------------
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!
User avatar
Geraint
Posts: 30518
Joined: Fri Feb 15, 2008 6:14 pm


Return to Contribute to JEvents

Who is online

Users browsing this forum: No registered users

Main Menu

User Menu

Hosted By


Who is online

In total there are 0 users online :: 0 registered and 0 hidden (based on users active over the past 5 minutes)
Most users ever online was 94 on Tue Sep 01, 2009 12:33 am

Users browsing this forum: No registered users

Login Form