Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Forum: Fixing WordPress
    In reply to: New post error

    Hello

    1. Plugin Conflict
      Issue: A plugin might be causing a conflict, leading to the blank page.

    Solution:
    Deactivate all plugins via Dashboard > Plugins > Installed Plugins.

    If the issue is resolved, reactivate plugins one by one, checking the page after each activation to find the culprit.

    1. Theme Issues

    Issue: Your active theme might be causing the issue.
    Solution: Switch to the default Twenty Twenty theme (or any default theme) via Appearance > Themes and see if the problem persists.

    1. Insufficient PHP Memory
      Issue: Your site might be running out of memory.
      Solution: Increase the PHP memory limit
    Thread Starter Krips

    (@krips)

    Sorry, Now you will be able to access the links

    Thread Starter Krips

    (@krips)

    Thread Starter Krips

    (@krips)

    For Message response (https://prnt.sc/rdzBiJxjNI57) , you need to make modification in below file
    FIle path : src/Tribe/Views/V2/Messages.php

    public static function for_key($key, ...$values) {
    $map = [
    'no_results_found' => __(
    'There were no results found.',
    'the-events-calendar'
    ),
    'no_upcoming_events' => sprintf(
    _x(
    'There are no upcoming %1$s.',
    'A message to indicate there are no upcoming events.',
    'the-events-calendar'
    ),
    tribe_get_event_label_plural_lowercase()
    ),
    'month_no_results_found' => __(
    'Test 4 There were no results found for this view.',
    'the-events-calendar'
    ),
    'no_results_found_w_keyword' => __(
    'Test 1 There were no results found for <strong>"%1$s"</strong>.',
    'the-events-calendar'
    ),
    'month_no_results_found_w_keyword' => __(
    'Test 2 There were no results found for <strong>"%1$s"</strong> this month.',
    'the-events-calendar'
    ),
    'day_no_results_found' => __(
    'No %1$s scheduled for %2$s.',
    'the-events-calendar'
    ),
    'month_no_results_found_w_ff_link' => __(
    'Test 3 There were no results found for this view. %1$s',
    'the-events-calendar'
    ),
    'day_no_results_found_w_ff_link' => __(
    'No %1$s scheduled for %2$s. %3$s',
    'the-events-calendar'
    ),
    ];

    $map = apply_filters('tribe_events_views_v2_messages_map', $map);

    $match = Arr::get($map, $key, $key);

    if (empty($values)) {
    return $match;
    }

    $need_events_label_keys = ['day_no_results_found', 'day_no_results_found_w_ff_link'];

    $need_events_label_keys = apply_filters('tribe_events_views_v2_messages_need_events_label_keys', $need_events_label_keys);

    if (in_array($key, $need_events_label_keys)) {
    array_unshift($values, tribe_get_event_label_plural_lowercase());
    }

    // Decode URL-encoded values
    $decoded_values = array_map('urldecode', $values);

    return sprintf($match, ...$decoded_values);
    }

    Thank you!

    Thread Starter Krips

    (@krips)

    Can you fix code here:

    For Search bar https://prnt.sc/yc9J9p1S0nJr , value should be as below in file template :
    src/views/v2/components/events-bar/search/keyword.php

    value="<?php echo esc_attr( urldecode( tribe_events_template_var( [ 'bar', 'keyword' ], '' ) ) ); ?>"
    /* translators: %s: events (plural). */
    $placeholder = sprintf( __( 'Search for %s', 'the-events-calendar' ), tribe_get_event_label_plural_lowercase() );

    /* translators: %s: events (plural). */
    $aria_label = sprintf( __( 'Enter Keyword. Search for %s by Keyword.', 'the-events-calendar' ), tribe_get_event_label_plural_lowercase() );
    ?>
    <div
    class="tribe-common-form-control-text tribe-events-c-search__input-control tribe-events-c-search__input-control--keyword"
    data-js="tribe-events-events-bar-input-control"
    >
    <label class="tribe-common-form-control-text__label" for="tribe-events-events-bar-keyword">
    <?php printf( esc_html__( 'Enter Keyword. Search for %s by Keyword.', 'the-events-calendar' ), tribe_get_event_label_plural() ); ?>
    </label>
    <input
    class="tribe-common-form-control-text__input tribe-events-c-search__input"
    data-js="tribe-events-events-bar-input-control-input"
    type="text"
    id="tribe-events-events-bar-keyword"
    name="tribe-events-views[tribe-bar-search]"
    value="<?php echo esc_attr( urldecode( tribe_events_template_var( [ 'bar', 'keyword' ], '' ) ) ); ?>"
    placeholder="<?php echo esc_attr( $placeholder ); ?>"
    aria-label="<?php echo esc_attr( $aria_label ); ?>"
    />
    <?php $this->template( 'components/icons/search', [ 'classes' => [ 'tribe-events-c-search__input-control-icon-svg' ] ] ); ?>
    </div>
    • This reply was modified 4 months, 2 weeks ago by Krips.
    • This reply was modified 4 months, 2 weeks ago by Yui.
    Thread Starter Krips

    (@krips)

    Gotcha! Isn’t that confusing when it is disabled product with multiple variation added to the wish list without variation name,
    I suggest there should be then one product in wish-list if option is disabled.

    Anyways Thank you for your response, saved my time.


    Thread Starter Krips

    (@krips)

    Hello

    Thank you for quick response, I am not using any other plugin to modify stocks, it’s just i was testing and found a bug

    When I add any out of stock product into my wishlist , it shows status as in-stock in wishlist
    https://prnt.sc/SUECjjzUCCd8
    https://prnt.sc/CfN3PthXurzL

    Thread Starter Krips

    (@krips)

    Also Time slot Is not being saved
    I have shared updated working code
    File : class.saab.admin.fieldmeta.php
    line 964

    if (isset($_POST['generatetimeslot'])) {
    
    $generatetimeslots = $_POST['generatetimeslot'];
    
    // Sanitize and save the values
    
    $sanitized_generatetimeslots = array();
    
    foreach ($generatetimeslots as $generatetimeslot) {
    
    $generatestart_time = $generatetimeslot['start_time'];
    
    $generateend_time = $generatetimeslot['end_time'];
    
    $sanitized_generatetimeslots[] = array(
    
    'start_time' => $generatestart_time,
    
    'end_time' => $generateend_time,
    
    );
    
    }
    
    update_post_meta($post_id, 'saab_generatetimeslot', $sanitized_generatetimeslots);
    
    }else{
    
    $generatetimeslots = get_post_meta($post_id, 'saab_generatetimeslot', true);
    
    if (empty($timeslots)) {
    
    $sanitized_generatetimeslots = array(
    
    array(
    
    'start_time' => '',
    
    'end_time' => '',
    
    ),
    
    );
    
    }
    
    update_post_meta($post_id, 'saab_generatetimeslot', $sanitized_generatetimeslots);
    
    }

    // Advance fields
    LIne no 1000 same file

     if (isset($_POST['advancedata'])) {                
                    $advancedata = $_POST['advancedata'];                
                    update_post_meta($post_id, 'saab_advancedata', $advancedata);
                }else {
                    delete_post_meta($post_id, 'saab_advancedata');
                }


    // Booking stops after – line 892 replace with updated working code

    $booking_stops_after_duration = $_POST['booking_stops_after'];
    
    $sanitized_booking_stops_after_duration = array(
    
    'hours' => sanitize_text_field( $booking_stops_after_duration['hours'] ),
    
    'minutes' => sanitize_text_field( $booking_stops_after_duration['minutes'] )
    
    );
    
    // Update the post meta data with the field value
    
    update_post_meta( $post_id, 'saab_booking_stops_after', $sanitized_booking_stops_after_duration );
    
    }
    • This reply was modified 10 months, 2 weeks ago by Krips.
    • This reply was modified 10 months, 2 weeks ago by Krips.
    • This reply was modified 10 months, 2 weeks ago by Krips.
Viewing 8 replies - 1 through 8 (of 8 total)