Forum Replies Created
-
AuthorPosts
-
Lou
ParticipantThanks. There was no output in the debug log from either plugin (yours or theirs) when the error occurs. Plan is to back out to releases which were working to try to isolate the problem between the two plugins. The other plugin vendor is supporting, and plans to try to reproduce but I don’t have a lot of hope because as mentioned I wasn’t able to reproduce on another vhost.
Unfortunately I’m going out of town for a week and won’t be able to work on this while out.
Please keep this open if possible. Or if you do close it I hope I can comment on it later.
Lou
ParticipantActually it is All in One WP Migration Google Drive extension. I can’t seem to reproduce on another server. Please help me help you debug this with suggestions.
Lou
ParticipantI started deactivating plugins and got lucky because the problem was resolved when deactivating an early plugin in the list: All-in-One WP Migration.
Will you be able to figure out why there is a new issue with this plugin working with yours?
I generally use this plugin nightly for backups, so I don’t believe I can leave it disabled.
Lou
ParticipantSeems like theeventscalendar has a new global variable “debug” which was incompatible with a theme variable of the same name. When the theme javascript for this page loaded, the “debug” variable was overwritten which caused the error in theeventscalendar.
I’ve renamed the theme variable which resolved the problem.
-
This reply was modified 8 years, 2 months ago by
Lou.
Lou
Participantdefinitely looks like bug, in tribe-events.js line 1320
dbug && debug.info( 'TEC Debug: Tribe Events JS init, Init Timer started from tribe-events.js.' );September 25, 2017 at 12:18 pm in reply to: On login view, want Register link to be button like Log In #1354469Lou
ParticipantThis problem is resolved.
You gave me the idea. I replaced the div tag with classes that a) will be handled some with tribe styles, and, b) add some of my styles. See https://codepen.io/louking/pen/JrKgqq which copies the tribe styles for .tribe-community-edit .button-primary and .tribe-community-edit .button, and also is enhanced with .my-button styles (which I have in my theme).
I think if I use a button I have to mess with form tags and javascript to handle the submission.
September 25, 2017 at 11:33 am in reply to: On login view, want Register link to be button like Log In #1354432Lou
ParticipantThanks for the guidance. I just came up for air on some other stuff I was working on, and will start looking at this solution and report back. I am only commenting here, now, to forestall any automated closure which might happen in the time I am looking at it.
September 19, 2017 at 9:53 am in reply to: On login view, want Register link to be button like Log In #1351342Lou
ParticipantThanks.
Is there any way to keep this from getting overwritten when a new release comes out? E.g., if I copy Main.php to wp-content/themes/<theme>/tribe-events/community and modify that version, will the themes version take precedence? I think you are saying that won’t work.
If not how do I do this in a way that would survive an update to community events?
Lou
ParticipantThe issue was that the #tribe-events div was opened in the “before-html” filter, and closed in the “after-html” filter.
My wrapping this completely within [div] … [/div] effectively closed the #tribe-events div rather than mine, so the on click event tied to #tribe-events was not processing.
Solution is to open my class div in the before-html filter and close it in the after-html filter.
For anyone following this discussion, the links I gave above cannot be edited, but can be seen in the https://github.com/louking/steeps/blob/6caca502bb9e6c128fd0a6718f172e866a9620b6/functions.php version.
This has been fixed in https://github.com/louking/steeps/commit/362ab43ad8426a1137e65c347bfc9935d72222d0
Lou
ParticipantI finally got a chance to look at this. In https://github.com/louking/steeps/blob/master/functions.php when I comment out https://github.com/louking/steeps/blob/master/functions.php#L347 the month navigation works.
Reference https://steeplechasers.org/events/
What I am doing is trying to control the html display before the rest of the page so I can display different headers for community events. For community events I determine the type of page in steeps_ce_determine_class_edit (https://github.com/louking/steeps/blob/master/functions.php#L298) or steeps_ce_determine_class_list (https://github.com/louking/steeps/blob/master/functions.php#L328). But for the month view I leave the event class as steeps-ce-class-unknown (https://github.com/louking/steeps/blob/master/functions.php#L280).
Based on this class my css displays the right header. (for reference starting at https://github.com/louking/steeps/blob/master/style.css#L1393)
This filter at https://github.com/louking/steeps/blob/master/functions.php#L342 wraps the “before html” in a [div] with my class.
What I do not understand is why this causes the month navigation to stop working.
Lou
ParticipantThanks for your offer.
I may do this but will wait until I have a chance to try to debug on my own. I don’t feel right asking you for help until I have taken that step myself. Having said that, if you are curious and have infinite spare time 🙂 the theme can be found at https://github.com/louking/steeps. There are a couple of expectations of the theme — I’m not sure how it will behave with an empty database.
I’m in the middle of another project, so will not be able to get to this for at least a few days, but maybe a week or two.
Thanks again.
-
This reply was modified 8 years, 9 months ago by
Lou. Reason: clarification, and pointer to theme repo
Lou
ParticipantThanks for the quick reply. In sandbox.steeplechasers.org I switched to 2015 theme and the problem was not evident, so apparently this is a problem with the ‘steeps’ theme I wrote or some javascript I included. With that in mind I’ll try to debug. If you have any suggestions for this process would be appreciated.
Lou
ParticipantYes, everything Alex said.
While I’m not sure there is an out of the box ‘duplicate’ on the backend — I think I’m using Event Rocket plugin for that feature — I’d like to see one which copies everything for the Community Events for the person with subscriber role, i.e., not from wp-admin, as well.
Note I’m using Community Events, not Community Tickets, but from context I think there’s some common code base.
Lou
ParticipantInteresting timing because I was just about to add the same comment / request. Commenting now so I’ll see responses to this.
Lou
ParticipantRetrying my lengthy reply:
I was able to get the css method to work. It required using actions invoked at the start of the event add and event list functions by Main.php. I’m documenting this here in case anyone else has similar needs. Note my theme is “steeps” (https://github.com/louking/steeps) so all of the functions and classes start with steeps_
This behavior can be seen at https://sandbox.steeplechasers.org/events/community/add
functions.php – add to the bottom
/** * For The Events Calendar: Community Events, on the event page, check for some special conditions. This is * being done to control display of "before html" content */ if ( is_plugin_active('the-events-calendar-community-events/tribe-community-events.php') ) { $ce_event_class = 'steeps-ce-class-unknown'; // adapted from Tribe__Events__Community__Main.get_submitted_event (Main.php) function steeps_get_submitted_event() { if ( empty( $_POST[ 'community-event' ] ) ) { return array(); } if ( ! check_admin_referer( 'ecp_event_submission' ) ) { return array(); } $submission = $_POST; return $submission; } // adapted from Tribe__Events__Community__Main.doEventForm (Main.php) // this action is invoked before community/edit processing function steeps_ce_determine_class_edit ( $id ) { global $ce_event_class; if ( $id ) { $tribe_event_id = $id = intval( $id ); } else { $tribe_event_id = null; } if ( $tribe_event_id ) { $event = get_post( intval( $tribe_event_id ) ); } // special class if logged out // NOTE: assumes allow anonymous submissions configured as false if ( ! is_user_logged_in() ) { $ce_event_class = 'steeps-ce-class-logged-out'; // logged in } else { $submission = steeps_get_submitted_event(); if (! empty( $submission )) { $ce_event_class = 'steeps-ce-class-submitted'; } else { $ce_event_class = 'steeps-ce-class-empty-form'; } } } add_action( 'tribe_community_before_event_page', 'steeps_ce_determine_class_edit', 11 ); // adapted from Tribe__Events__Community__Main.doMyEvents (Main.php) // this action is invoked before community/list processing function steeps_ce_determine_class_list ( ) { global $ce_event_class; // special class if logged out if ( ! is_user_logged_in() ) { $ce_event_class = 'steeps-ce-class-logged-out'; // logged in } else { $ce_event_class = 'steeps-ce-class-list'; } } add_action( 'tribe_ce_before_event_list_page', 'steeps_ce_determine_class_list', 11 ); function steeps_before_html ( $string ) { global $ce_event_class; return '<div class="steeps-ce-before-html ' . $ce_event_class . '">' . $string . '</div>'; // return '<div class=steeps-ce-before-html>' . $string . '</div>'; } add_filter( 'tribe_events_before_html', 'steeps_before_html' ); // after html is noop for now function steeps_after_html( $string ) { return $string; } add_filter( 'tribe_events_after_html', 'steeps_after_html' ); }style.css – add to the bottom
/* * before html styling */ .tribe-events-before-html ul li { line-height: inherit; margin: 0 0 0 0; } .tribe-events-before-html table { border-collapse: collapse; } .tribe-events-before-html table, .tribe-events-before-html th, .tribe-events-before-html td { /*border: 1px solid black;*/ padding: 3px; } body.tribe_community_edit .steeps-ce-class-logged-out > form#loginform { margin-top: 21px; } body.tribe_community_edit .steeps-ce-class-logged-out > .register { margin-bottom: 21px; } /* * the events calendar - before html configuration * selective for month view, community events add, community events list * requires steeps-event-community-xxxx class to be used in before or after html configuration */ body.events-gridview .steeps-event-month-view { display: initial !important; /* display only on month view */ } body.tribe_community_edit .steeps-ce-class-logged-out .steeps-event-community-logged-out, body.tribe_community_list .steeps-ce-class-logged-out .steeps-event-community-logged-out { display: initial !important; /* display when logged out ( edit and list views) */ } body.tribe_community_edit .steeps-ce-class-logged-out > p, body.tribe_community_list .steeps-ce-class-logged-out > p { display: none; /* hide default text when logged out ( edit and list views) */ } body.tribe_community_edit .steeps-ce-class-empty-form .steeps-event-community-add { display: initial !important; /* display only on community add empty form */ } body.tribe_community_edit .steeps-ce-class-submitted .steeps-event-community-add-submitted { display: initial !important; /* display only on community add after submission */ }example “before html” events display configuration (with angle brackets replaced with square brackets)
[div class="steeps-event-month-view" style="display: none;"] To request that your event be added to the Steeplechasers Events calendar, please click on [a href="https://steeplechasers.org/events/community/add"]Add Event[/a]. To find events for which volunteers are needed, under Event Category, check Course Marking and Finish Line, and click SUBMIT. If you see a race you can help at, send email to [a href="mailto:[email protected]"][email protected][/a]. (If you don't see Event Category, try clicking 'Show Filters' first). [/div] [div class="steeps-event-community-add" style="display: none;"] Race Directors should use this form to request that local running events (within 75 miles of Frederick, MD) be placed on our calendar. Please provide the following [table] [tr][th]Field[/th][th]Description[/th][/tr] [tr][td]EVENT TITLE[/td][td]Race Name[/td][/tr] [tr][td]EVENT DESCRIPTION[/td][td]Any text you'd like included in the race description, e.g., a little bit about why you're putting on this race, what it benefits, how to register -- registration URL, link to flyer, etc[/td][/tr] [tr][td]EVENT TIME & DATE[/td][td]Race Date and Time[/td][/tr] [tr][td]EVENT IMAGE[/td][td]Optionally add an image to your event[/td][/tr] [tr][td]VENUE DETAILS[/td][td]Race Location - please search first as the venue may already exist[/td][/tr] [tr][td]ORGANIZER DETAILS[/td][td]Organizer Name (required), Organizer Email (required), Organizer Phone (optional). Again please search first as the organizer may already exist[/td][/tr] [tr][td]EVENT WEBSITE[/td][td]Race Website - this website should give information about the race and most likely also links to registration site[/td][/tr] [/table] [/div] [div class="steeps-event-community-add-submitted" style="display:none;"] Your submission will be reviewed before publishing -- this process can take several days. [b]Note:[/b] FSRC reserves the right to choose which races are published. [/div] [div class="steeps-event-community-logged-out" style="display:none;"] You need to be logged in to edit or list events. If you have an account, please log in below, otherwise please register using the "Register" link beneath the LOG IN button. [/div] -
This reply was modified 8 years, 2 months ago by
-
AuthorPosts
