Forum Replies Created

Viewing 15 replies - 16 through 30 (of 129 total)
  • Thread Starter Nico

    (@gooloode)

    So i’ve deleted all caches and object caches (SQLite) and the file still appears and it also starts in the post editor. I’ve now contacted my hosting support, as i can’t find any file you mentioned and the mu-plugins folder is “empty” (no FDP files).

    Thread Starter Nico

    (@gooloode)

    Oh, i forgot: Of course i went into the mu-plugins folder, but there isn’t any files of FDP, nor a folder.

    Thread Starter Nico

    (@gooloode)

    Hi, i’ve disabled and deleted LiteSpeed entirely and none of the Snippets work on the frontend for the entire website. There’s also no changes in formatting. Still, the issue persists.

    Thread Starter Nico

    (@gooloode)

    Hi, so i’m not using anything to change the design. And i use very few plugins for very basic tasks:

    Thread Starter Nico

    (@gooloode)

    I also saw these errors in the console:

    Uncaught TurnstileError: [Cloudflare Turnstile] Invalid type for “container”, expected “selector” or an implementation of “HTMLElement”, got “#cf-turnstile-wpd-0_0”.Fehler nachvollziehen
    jquery.min.js?ver=3.7.1:2 Uncaught TurnstileError: [Cloudflare Turnstile] Invalid type for “container”, expected “selector” or an implementation of “HTMLElement”, got “#cf-turnstile-wpd-wpdiscuzuniqueid”.

    https://www.gooloo.de/wp-content/plugins/wpdiscuz/utils/ajax/wpdiscuz-ajax.php

    Thread Starter Nico

    (@gooloode)

    I cant disable it 😅 Its completely included and configured over my Hosting Provider since i had issues in the past with Delivery. They explicitly told me to please not change anything. 😅😅

    Thread Starter Nico

    (@gooloode)

    Thank you very much! 🙂

    Thread Starter Nico

    (@gooloode)

    Hi, of course and i’m very sorry about the confusion. So here’s the rundown. 😀

    I have created a Code Snippet that displays a subscription form on every category page. Each category has it’s own list on MailPoet (since this was the only way i was able to set-up post notifications to categories specifically). That results in having created 1.135 Lists in the MailPoet Settings.

    I wanted to create a Template, or already have so, and now i need to add all 1.135 categories/lists to use this template:

    But there is no way to select over 1.000 lists. I would have to click on “Send to” and select each List singlehandedly.

    Here’s an example category: https://www.gooloo.de/category/concealer

    And this is the code snippet i use for the form:

    // Shortcode für Kategorie-spezifisches Abo-Formular mit AJAX
    function category_subscription_shortcode($atts) {
    $atts = shortcode_atts(
    array(
    'title' => 'Für diese Kategorie abonnieren',
    'button_text' => 'Abonnieren',
    'button_bg' => '#00d263',
    'button_text_color' => '#ffffff',
    ),
    $atts,
    'category_subscribe'
    );

    $current_category = null;
    $category_name = '';

    if (is_category()) {
    $current_category = get_queried_object_id();
    $category_name = single_cat_title('', false);
    } elseif (is_single()) {
    $categories = get_the_category();
    if (!empty($categories)) {
    $current_category = $categories[0]->term_id;
    $category_name = $categories[0]->name;
    }
    }

    if (!$current_category) {
    return '<div class="mp-category-subscribe-error">Keine Kategorie gefunden.</div>';
    }

    $hinweis = 'Lasse dich von uns per E-Mail benachrichtigen, wenn ein neuer Beitrag in der Kategorie "' . esc_html($category_name) . '" erscheint. Du kannst das Abonnement jederzeit beenden. Deine E-Mailadresse verwenden wir ausschließlich für den Versand der Benachrichtigungen, bis Du dein Abonnement beendest. Der Service ist kostenfrei.';

    ob_start();
    ?>
    <div class="mp-category-subscribe-wrapper" data-category-id="<?php echo esc_attr($current_category); ?>" data-category-name="<?php echo esc_attr($category_name); ?>">
    <p style="font-size: 1.1em; margin-bottom: 1em;"><?php echo $hinweis; ?></p>
    <h3><?php echo esc_html($atts['title']); ?></h3>
    <form class="mp-category-subscribe-form-ajax" method="post" autocomplete="off">
    <input type="hidden" name="category_id" value="<?php echo esc_attr($current_category); ?>">
    <input type="email" name="email" placeholder="Deine E-Mail-Adresse" required>
    <input type="hidden" name="mp_nonce" value="<?php echo wp_create_nonce('mp_category_subscribe_nonce'); ?>">
    <button type="submit" style="background-color:<?php echo esc_attr($atts['button_bg']); ?>;color:<?php echo esc_attr($atts['button_text_color']); ?>;"><?php echo esc_html($atts['button_text']); ?></button>
    </form>
    <div class="mp-category-subscribe-response" aria-live="polite"></div>
    </div>
    <style>
    .mp-category-subscribe-wrapper {
    background: #f0f3f6;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    }
    .mp-category-subscribe-wrapper h3 {
    margin-top: 0;
    color: #333;
    }
    .mp-category-subscribe-form-ajax {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    }
    .mp-category-subscribe-form-ajax input[type="email"] {
    flex: 1;
    min-width: 250px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    }
    .mp-category-subscribe-form-ajax button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    }
    .mp-category-subscribe-form-ajax button:hover {
    opacity: 0.9;
    }
    .mp-category-subscribe-response {
    margin-top: 15px;
    font-weight: bold;
    }
    .mp-category-subscribe-response.success {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 5px;
    }
    .mp-category-subscribe-response.error {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 5px;
    }
    </style>
    <?php
    return ob_get_clean();
    }
    add_shortcode('category_subscribe', 'category_subscription_shortcode');

    // AJAX Handler (ohne Seitenreload)
    add_action('wp_ajax_mp_category_subscribe_ajax', 'handle_category_subscription_ajax');
    add_action('wp_ajax_nopriv_mp_category_subscribe_ajax', 'handle_category_subscription_ajax');
    function handle_category_subscription_ajax() {
    // Nonce prüfen
    if (!isset($_POST['mp_nonce']) || !wp_verify_nonce($_POST['mp_nonce'], 'mp_category_subscribe_nonce')) {
    wp_send_json_error(array('message' => 'Sicherheitsüberprüfung fehlgeschlagen.'));
    }

    $email = isset($_POST['email']) ? sanitize_email($_POST['email']) : '';
    $category_id = isset($_POST['category_id']) ? intval($_POST['category_id']) : 0;

    if (empty($email) || empty($category_id)) {
    wp_send_json_error(array('message' => 'Bitte gib eine gültige E-Mail-Adresse ein.'));
    }
    if (!class_exists(\MailPoet\API\API::class)) {
    wp_send_json_error(array('message' => 'MailPoet ist nicht aktiv.'));
    }
    $mailpoet_api = \MailPoet\API\API::MP('v1');

    // Liste holen/erstellen
    $category = get_term($category_id, 'category');
    $category_name = $category ? $category->name : 'dieser Kategorie';
    $meta_key = 'mailpoet_category_list_id';
    $list_id = get_term_meta($category_id, $meta_key, true);

    if (empty($list_id)) {
    try {
    $list = $mailpoet_api->addList(array(
    'name' => 'Kategorie: ' . $category_name,
    'description' => 'Abonnenten der Kategorie ' . $category_name
    ));
    $list_id = $list['id'];
    update_term_meta($category_id, $meta_key, $list_id);
    } catch (\Exception $e) {
    wp_send_json_error(array('message' => 'Die Abonnentenliste konnte nicht erstellt werden.'));
    }
    }

    try {
    $subscriber = null;
    try {
    $subscriber = $mailpoet_api->getSubscriber($email);
    } catch (\Exception $e) {}
    if (empty($subscriber)) {
    $subscriber = $mailpoet_api->addSubscriber(
    array('email' => $email),
    array($list_id)
    );
    } else {
    $mailpoet_api->subscribeToList(
    $subscriber['id'],
    $list_id
    );
    }
    wp_send_json_success(array('message' => 'Du hast das Abonnement für die Kategorie <b>' . esc_html($category_name) . '</b> erfolgreich abgeschlossen!'));
    } catch (\Exception $e) {
    wp_send_json_error(array('message' => 'Beim Abonnieren ist ein Fehler aufgetreten. Bitte versuche es erneut.'));
    }
    }
    Thread Starter Nico

    (@gooloode)

    Hi, i’ve now made some adaptions, but your code was completely correct, thank you. I still though have an issue, that i can’t find an (obvious) reason to and that’s a huge heading before the form labels.

    /**
    * Plugin Name: Beauty Profile Form
    * Description: <code>[beauty-form]</code> - Displays a beauty profile form for logged-in users
    * Version: 1.0.0
    */

    // Register the shortcode
    add_shortcode(
    'beauty-form',
    function( $atts, $content, $tag ) {
    // Only show form for logged-in users
    if ( ! is_user_logged_in() ) {
    return '<p>Bitte melde dich an, um dein Beautyprofil zu bearbeiten.</p>';
    }

    // Start output buffering
    ob_start();

    // Get the current user's pod
    $user_pod = pods( 'user', get_current_user_id() );

    // Display the form
    ?>
    <div class="beauty-profile-form">
    <h2>Dein Beautyprofil</h2>

    <div class="beauty-form-container">
    <?php
    // Output the form using the Pods form() method
    echo $user_pod->form(
    [
    // First section - Hauttyp & Eigenschaften
    '__heading_1' => [
    'type' => 'html',
    'value' => '<h3 class="beauty-section-heading">Hauttyp & Eigenschaften</h3>'
    ],
    'alter',
    'hauttyp_gesicht',
    'hauttyp_koerper',
    'hautton',
    'hautprobleme',

    // Second section - Haar & Augen
    '__heading_2' => [
    'type' => 'html',
    'value' => '<h3 class="beauty-section-heading">Haar & Augen</h3>'
    ],
    'haartyp',
    'haarstruktur',
    'haardicke',
    'augenfarbe',
    ],
    'Profil aktualisieren'
    );
    ?>
    </div>
    </div>
    <?php

    // Add styles to the footer
    if ( ! has_action( 'wp_footer', 'beauty_form_styles' ) ) {
    add_action( 'wp_footer', 'beauty_form_styles' );
    }

    // Return the buffered output
    return ob_get_clean();
    }
    );

    /**
    * Add CSS styles to the footer
    */
    function beauty_form_styles() {
    ?>
    <style>
    /* Base container styling */
    .beauty-profile-form {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 100%;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    /* Fix for large gap - use flexbox layout */
    display: flex;
    flex-direction: column;
    }

    /* Main heading */
    .beauty-profile-form h2 {
    font-size: 24px;
    color: #333;
    text-align: center;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    }

    /* Form container - reduces gap */
    .beauty-form-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
    }

    /* Section headings */
    .beauty-section-heading {
    font-size: 20px !important;
    color: #444 !important;
    margin: 25px 0 15px 0 !important;
    padding-top: 20px !important;
    border-top: 1px solid #eee !important;
    }

    /* First section heading - no top border or padding */
    .beauty-section-heading:first-of-type {
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
    }

    /* Remove extra space from HTML fields */
    .pods-field-option-html {
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    }

    /* Remove any empty paragraphs that might cause spacing */
    .beauty-profile-form p:empty {
    display: none !important;
    }

    /* Field styles */
    .beauty-profile-form .pods-form-ui-field-type-pick,
    .beauty-profile-form select,
    .beauty-profile-form input[type="text"],
    .beauty-profile-form input[type="email"],
    .beauty-profile-form input[type="password"] {
    width: 100% !important;
    padding: 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    background-color: #f9f9f9 !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
    height: auto !important;
    line-height: 1.5 !important;
    margin-bottom: 15px !important;
    }

    /* Fix for checkbox inputs */
    .beauty-profile-form input[type="checkbox"] {
    width: auto !important;
    margin-right: 8px !important;
    }

    /* Focus states */
    .beauty-profile-form .pods-form-ui-field-type-pick:focus,
    .beauty-profile-form select:focus,
    .beauty-profile-form input[type="text"]:focus,
    .beauty-profile-form input[type="email"]:focus,
    .beauty-profile-form input[type="password"]:focus {
    border-color: #0073aa !important;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2) !important;
    outline: none !important;
    }

    /* Label styling */
    .beauty-profile-form .pods-form-ui-label {
    display: block !important;
    font-weight: 500 !important;
    margin-bottom: 8px !important;
    color: #333 !important;
    }

    /* Description text */
    .beauty-profile-form .description {
    font-size: 13px !important;
    color: #666 !important;
    margin-top: 5px !important;
    margin-bottom: 15px !important;
    }

    /* Fix for the checkbox list styling */
    .beauty-profile-form .pods-checkbox-pick {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    }

    .beauty-profile-form .pods-checkbox-pick__option {
    list-style-type: none !important;
    list-style-image: none !important;
    margin-bottom: 8px !important;
    position: relative !important;
    padding-left: 0 !important;
    }

    /* Remove the pink arrows/bullets */
    .beauty-profile-form .pods-checkbox-pick__option::before,
    .beauty-profile-form .pods-checkbox-pick__option::after,
    .beauty-profile-form li::marker,
    .beauty-profile-form .pods-checkbox-pick li::marker,
    .beauty-profile-form .pods-checkbox-pick__option::marker {
    display: none !important;
    content: none !important;
    color: transparent !important;
    }

    /* Checkbox container */
    .beauty-profile-form .pods-field.pods-boolean {
    margin-bottom: 10px !important;
    }

    /* Checkbox labels */
    .beauty-profile-form .pods-field.pods-boolean label,
    .beauty-profile-form .pods-checkbox-pick__option label {
    display: flex !important;
    align-items: center !important;
    font-weight: normal !important;
    }

    /* Submit button */
    .beauty-profile-form input[type="submit"] {
    background-color: #0073aa !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
    text-transform: none !important;
    box-shadow: none !important;
    height: auto !important;
    line-height: 1.5 !important;
    width: 100% !important;
    margin-top: 20px !important;
    }

    .beauty-profile-form input[type="submit"]:hover {
    background-color: #005a87 !important;
    }

    /* Field container spacing */
    .beauty-profile-form .pods-field__container {
    margin-bottom: 15px !important;
    }

    /* Additional selector to override Divi theme styling */
    .et-db #et-boc .et-l .beauty-profile-form .pods-checkbox-pick,
    .et-db #et-boc .et-l .beauty-profile-form .pods-checkbox-pick__option {
    list-style: none !important;
    list-style-type: none !important;
    padding-left: 0 !important;
    }

    .et-db #et-boc .et-l .beauty-profile-form .pods-checkbox-pick__option::before {
    display: none !important;
    content: none !important;
    }

    /* Responsive adjustments */
    @media (max-width: 768px) {
    .beauty-profile-form {
    padding: 20px;
    }
    }
    </style>
    <?php
    }

    /**
    * Add the beauty profile data to wpDiscuz comments
    */
    add_filter('wpdiscuz_after_comment_author', 'beauty_profile_fields_display', 10, 2);

    function beauty_profile_fields_display($output, $comment) {
    $user_id = $comment->user_id;

    // Only proceed if this is a registered user
    if (!$user_id) {
    return $output;
    }

    // Get PODS data for the user
    $user_pod = pods('user', $user_id);

    if (!$user_pod) {
    return $output;
    }

    // Array of fields to display
    $single_fields = [
    'alter' => 'Alter',
    'hauttyp_gesicht' => 'Hauttyp Gesicht',
    'hauttyp_koerper' => 'Hauttyp Körper',
    'haartyp' => 'Haartyp',
    'haarstruktur' => 'Haarstruktur',
    'haardicke' => 'Haardicke',
    'augenfarbe' => 'Augenfarbe'
    ];

    $additional_info = '';

    // Process single select fields
    foreach ($single_fields as $field_name => $field_label) {
    $field_value = $user_pod->field($field_name);
    if (!empty($field_value)) {
    $additional_info .= sprintf(
    '<div class="user-%s">%s: %s</div>',
    esc_attr($field_name),
    esc_html($field_label),
    esc_html($field_value)
    );
    }
    }

    // Process multiple select field
    $hautprobleme = $user_pod->field('hautprobleme');
    if (!empty($hautprobleme)) {
    $hautprobleme_value = is_array($hautprobleme) ? implode(', ', $hautprobleme) : $hautprobleme;
    $additional_info .= '<div class="user-hautprobleme">Hautprobleme: ' . esc_html($hautprobleme_value) . '</div>';
    }

    // Add the information to the output if there's any information to display
    if ($additional_info) {
    $output .= '<div class="user-profile-info">' . $additional_info . '</div>';
    }

    return $output;
    }

    /**
    * Add styles for the beauty profile info in comments
    */
    add_action('wp_head', 'beauty_profile_comment_styles');

    function beauty_profile_comment_styles() {
    ?>
    <style>
    /* Styling for beauty profile info in comments */
    .user-profile-info {
    font-size: 12px;
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    }

    .user-profile-info > div {
    background-color: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
    color: #666;
    margin-right: 5px;
    margin-bottom: 5px;
    }

    @media (max-width: 480px) {
    .user-profile-info {
    flex-direction: column;
    gap: 3px;
    }

    .user-profile-info > div {
    margin-right: 0;
    }
    }
    </style>
    <?php
    }

    Screenshot

    Forum: Plugins
    In reply to: [Accordions] Wrong styling
    Thread Starter Nico

    (@gooloode)

    Hi, so i’ve now added the Beta Plugin but with no margin and margin 20px, the Accordion looks still exactly the same. As i stated, it might come from an update, as i haven’t changed the CSS since i’ve added them to my site, which was nearly two years ago.

    Thread Starter Nico

    (@gooloode)

    Hi, that isn’t possible. Your Plugin doesn’t allow partial URLs, it has to be a full URL. I’ve now tried to replace it with cdn.gooloo.de/wp…, but the same issue happens. It appends just another cdn.gooloo.de, so cdn.gooloo.de/https://cdn.gooloo.de…

    Thread Starter Nico

    (@gooloode)

    Hi, of course. 🙂 The correct Link would be https://cdn.gooloo.de/wp-content/uploads/2024/09/defaultavatar.webp (without the added https://www.gooloo.de after the CDN URL)

    Forum: Plugins
    In reply to: [Accordions] Wrong styling
    Thread Starter Nico

    (@gooloode)

    Hi, i added both margins, but it still isn’t right. There’s something about the plugin itself, as this just happened. There’s still this atrocity: https://scrnli.com/files/wa4h26u83IR7DH

    It’s supposed to be looking as fresh from the start, as i didn’t change anything from the original plugin’s settings. the only thing i changed was the colors.

    • This reply was modified 1 year, 5 months ago by Nico.
    Thread Starter Nico

    (@gooloode)

    Hi, i now have deleted it completely and set-up again. I will close this ticket for now, as your suggestions means it should fix that; and if something happens, i will re-open this ticket. Thank you for your help! 🙂

    Thread Starter Nico

    (@gooloode)

    Hi @robert681!

    So, the Issue persists somewhere deep in the plugin, because this issue comes up at any given time. There seems to be an deep-lying Issue, because sometimes this error is caused and way in the day, when i check my E-Mails, i see two fatal Error Mails from WordPress, with different issues, but always based off WP2FA.

    Currently, these Errors have never broken the site, but still caused fatal errors, reported via Mail. There is no step to reproduce, as these issues, always with WP2FA, happened at any of these moments. But: They never broke the site.

    My Plugin is auto-updated, always to the most current version, currently 2.8.0 on always the newest WP Version, currently 6.6.2, PHP 8.1+

    At this time, these errors happened, when:

    • Updating a Post
    • Updating a Plugin
    • Adding a Code Snippet that is completely unrelated to WP2FA
    • Updating a Theme
Viewing 15 replies - 16 through 30 (of 129 total)