Forum Replies Created
-
AuthorPosts
-
March 8, 2018 at 4:08 am in reply to: Filter bar not showing results for bulk edited events #1473104iamchrisoneParticipant
Sky,
I did a little more digging in to this by looking at the database tables in the back end and have found source of the bug.
For each custom field in each post there are at two meta_key in the wpff_postmeta table:
_ecp_custom_x
__ecp_custom_xFor a post that has single value for the custom field the table looks like:
meta_key – meta_value
_ecp_custom_x – value1
__ecp_custom_x – value1For a post that has multiple values for the custom field, the first meta_key contains all the values and the second meta_key is replicated and for each value table should look like this:
meta_key – meta_value
_ecp_custom_x – value1|value2|value3|valuen+1
__ecp_custom_x – value1
__ecp_custom_x – value2
__ecp_custom_x – value3
__ecp_custom_x – valuen+1However, when we use the CSV import to import a custom field with multiple values the table looks like:
meta_key – meta_value
_ecp_custom_x – value1|value2|value3|valuen+1
__ecp_custom_x – value1|value2|value3|valuen+1After importing from CSV I can manually go through the db and add the required additional meta_keys in order to get the filter bar to display properly.
As a workaround until the bug is fixed, would it be possible that someone there at tribe could write a piece of script to rectify the table entries? I don’t have the knowledge / experience to be able to write it myself.
Thanks,
Chris.- This reply was modified 6 years, 1 month ago by iamchrisone.
March 1, 2018 at 1:14 am in reply to: Filter bar not showing results for bulk edited events #1466845iamchrisoneParticipantSky,
Thanks for the code. Unfortunately it didn’t work for me. I can’t tell if it did anything at all but certainly didn’t update the event withe the filter bar issue.
Anything else we can try?
Cheers,
Chris.February 27, 2018 at 1:05 pm in reply to: Filter bar not showing results for bulk edited events #1465278iamchrisoneParticipantHi Sky,
I’m glad you were able to recreate and log the bug. Is there any chance you could help me with some kind of workaround until the bug gets fixed? Perhaps some way of pragmatically triggering a save / update for all events?
Thanks,
Chris.iamchrisoneParticipantThis reply is private.
February 27, 2018 at 1:15 am in reply to: Filter bar not showing results for bulk edited events #1464555iamchrisoneParticipantThis reply is private.
February 26, 2018 at 10:22 am in reply to: Filter bar not showing results for bulk edited events #1463971iamchrisoneParticipantThis reply is private.
February 26, 2018 at 8:49 am in reply to: Filter bar not showing results for bulk edited events #1463893iamchrisoneParticipantHi Sky,
I have the exact same issue when I update the custom field when using the Events Calendar CSV import. So please could you help me with that?
When I tested the CSV import I reverted to WordPress TWentySeventeen and disabled all other plugins.
Regards,
Chris.February 26, 2018 at 5:20 am in reply to: Filter bar not showing results for bulk edited events #1463629iamchrisoneParticipantHi Sky,
I somehow missed / did’t get notification of your reply so my apologies for not getting back to you. To answer your question: If we go to the event editor for one of the bulk edited events and click ‘update’ the event will then show in the filter bar results correctly. There’s no need to add any spaces or make any further changes.
In the mean time I have tried some more troubleshooting. I reverted to default WordPress TwentySeventeen theme and disabled all plugins except Event Calendar, Event Calendar Pro and Event Calendar Filter Bar. The I used the CSV import to update _Event_Category and _ecp_custom_4.
Import of _Event_Category works perfectly. Import of _ecp_custom_4 exhibits the same behaviour as described previously. Ie. the field updates but does not show in filter bar results. If we go in to the event editor and click update then it will show in the filter bar results.
Hope you can help with this as I really, really don’t want to be manually updating this field for hundreds of events.
Regards,
Chris.February 22, 2018 at 1:48 am in reply to: Filter bar not showing results for bulk edited events #1460684iamchrisoneParticipantHi Sky,
The plugin is “Bulk Postmeta Editor”. I think I remember running in to a similar issue with CSV import, whereby the field would be updated but wouldn’t show up in the filter bar results.
I’m editing _ecp_custom_4 “Series”
If you have any other suggestions for bulk / editing this field I’d love to hear them.
February 20, 2018 at 1:01 am in reply to: Filter bar not showing results for bulk edited events #1458357iamchrisoneParticipantThis reply is private.
December 21, 2017 at 5:40 am in reply to: Please help, CSV import has messed up filter bar display of additional feilds #1410736iamchrisoneParticipantThis reply is private.
December 7, 2017 at 2:06 am in reply to: Use theme page layouts on calendar, list and single item views #1400087iamchrisoneParticipantHi Geoff,
File attached this time.
Cheers,
Chris.December 6, 2017 at 3:19 pm in reply to: Use theme page layouts on calendar, list and single item views #1399883iamchrisoneParticipantHey Cliff,
Sorry. You are dead right. The default events template has a completely different layout, no sidebars at all. If you could either point me in the right direction for adding sidebars to the default events template or help me figure out how to instruct my theme to apply a specific layout to the events pages would be awesome.
<Edit> I think I just found via a link on another Events Calendar support thread how to add a custom sidebar to the default events template. This should do it no? https://www.ostraining.com/blog/wordpress/custom-sidebar/ <Edit/>
Just out of sheer curiosity and if you really don’t mind taking a look it would still be really neat to know how to get my theme to force a particular layout on the event calendar. I’ve attached a .zip of the theme. After diffing around, it looks to me as if the layout is specified in core.php from line 284 to 305. Some more digging around various other forums and I think maybe something like the following code in my functions php might do what I’m looking for. What do you think?
function septera_force_layout_class() {
if( ‘custom-post-type-name’ == get_post_type() ) {
$septera_sitelayout = “two-columns-left”;
}
}Cheers,
Chris.iamchrisoneParticipantHi Jamie,
Turns out it was actually REALLY easy. I found this post from your colleague Victor: https://theeventscalendar.com/support/forums/topic/how-to-sort-the-filters-in-the-filter-bar-alphabetically/
I added his code to functions.php and modified it only slightly, changing ‘sort’ for ‘ksort’ to sort by key. It seems to have worked.
Here is the code:
* The Events Calendar – Change filter values order
*/
add_filter( ‘tribe_events_filter_values’, ‘tribe_re_order_filter_categories’, 10, 2 );function tribe_re_order_filter_categories ( $values , $slug ){
if ( $slug == ‘_ecp_custom_11’ ) {
//sort($values); // a-z
//rsort($values); // z-a
ksort($values);
}return $values;
}Regards,
Chris.December 6, 2017 at 3:44 am in reply to: Use theme page layouts on calendar, list and single item views #1399261iamchrisoneParticipantHi Cliff,
Thanks for the reply. Yeah for sure I can set a default layout for my theme.
wp-admin > Events > Settings > Display tab > “Events template” lets me choose between my theme “default page template” and the the the “default events template”.
Both of those templates pick up the theme default layout. The crux of my issue is that my blogs page also picks up the default theme layout and I really, really want the blog page and the events pages to have different layouts. Once sidebar for blog page and 2 sidebars for events page.
It might well be that I need to go away and learn some PHP and CSS before I’m able to achieve this. I was kind of hoping that you might be able to point me in the right direction so I could come up what i’m after with some cut & paste / trial and error.
No worries, thanks anyways Cliff. I’ll post on the theme forums and see how I get on.
Cheers,
Chris. -
AuthorPosts