Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 166 total)
  • Author
    Posts
  • EddyPiVEddyPiV
    Participant

    Thanks Peter, I was able to restore a backup in staging and recover the post types and their custom fields and views in the database.

    in reply to: Invalid request. Please try again. #49066
    EddyPiVEddyPiV
    Participant

    Peter, I don't want to use the wordpress hook.
    I follow your recommendation to use the JavaScript code to reload the page. What I want to know is the trigger that should fire the Javascript. If it's not this hook, then what is it?
    How can I reload the full page after successful safe?

    in reply to: Invalid request. Please try again. #49059
    EddyPiVEddyPiV
    Participant

    Typo, but result is the same...

    jQuery(document).ready(function($) {
        // This fires when MB Frontend Form finishes saving
        $(document).on('rwmb_frontend_after_save', function(e, data) {
            console.log("✅ MB form saved, reloading now...", data);
            window.location.reload();
        });
    });
    in reply to: Invalid request. Please try again. #49058
    EddyPiVEddyPiV
    Participant

    I would expect that the action rwmb_frontend_after_save_post should be used, but it's not firing.

    This is my reload-after-save-metabox.js:

    jQuery(document).ready(function($) {
        // This fires when MB Frontend Form finishes saving
        $(document).on('mb_frontend_after_save', function(e, data) {
            console.log("✅ MB form saved, reloading now...", data);
            window.location.reload();
        });
    });

    I'm a real beginner with JavaScript. Can you point me in the right direction?

    in reply to: Invalid request. Please try again. #49026
    EddyPiVEddyPiV
    Participant

    You're right.
    As the frontend submission form is loaded within a popup window and I have only the memberid (which is the page title) a used a get_posts with just 1 post.
    I've changed it: upon clicking the pencil icon I store the post-id in a user meta field which I read in the View (from where the frontend submission is called).
    Now it saves properly.

    Now just another question arises: I've set the redirect url, but it doesn't reload the entire page. Ajax=false.
    How can I reload the entire page, so that the saved changes become visible right after?

    in reply to: Invalid request. Please try again. #49003
    EddyPiVEddyPiV
    Participant

    Hi Peter, is there any news on this from the development team?

    Regards,
    Eddy

    in reply to: How to use Switch to have effect on the View? #48916
    EddyPiVEddyPiV
    Participant

    Peter, that's not what I want.

    To illustrate this image: https://drive.google.com/file/d/1z-Leoi2ysHyBy6Ek1r7KldYSSp0Qs7UN/view?usp=sharing

    I want to toggle, with immediate effect on the images shown. I don't want to submit.
    How can I do that?

    (It's just that the documentation says that it's saved in the database. So I added it as a user meta field. But I actually just need the toggle, switch on / off)

    in reply to: Invalid request. Please try again. #48815
    EddyPiVEddyPiV
    Participant

    Peter, my sites are hosted at WPMUDev, they have documentation about it here: https://wpmudev.com/docs/hosting/tools-features/#object-cache

    Do you want me to check with them for a way that your development team can discuss this further with them?
    As I don't think that me staying in the middle will be very practical.
    Let me know.

    in reply to: Invalid request. Please try again. #48813
    EddyPiVEddyPiV
    Participant

    Hi,

    I got a response from the support unit of my hosting provider.

    After further investigation, I found that the issue is with the Metabox plugin, which is not compatible with the Object Caching feature. This explains why it functions correctly on the staging site, where Object Caching is not active.
    Please note that disabling Object Cache is not recommended, as it can significantly impact server performance. I suggest reaching out to the developers of the Metabox plugin to inform them of this issue, as it seems their plugin is not designed to be compatible with the server’s Object Caching.

    Can you pls have this checked and see if this can be resolved?
    Thanks a lot, regards,
    Eddy

    EddyPiVEddyPiV
    Participant

    Hi Peter,

    I have created a showcase site and sent details through your contact link.
    Good luck!

    in reply to: Invalid request. Please try again. #48805
    EddyPiVEddyPiV
    Participant

    I made a fresh copy in staging, and there it's working nicely.
    I'm checking with the support team of my hosting provider. Hoepfully they can help solve it, or at least help understanding what / where to investigate. I may get back here.

    EddyPiVEddyPiV
    Participant

    Hi Peter,

    Yes, I mean the custom fields are not stored in the custom table, but still in the postmeta table.

    I don't understand your suggestion. Whether the custom fields are stored in postmeta or custom table, isn't that a Metabox matter? Why should that affect Make? Make delivers the custom fields, yet they arrive in postmeta.

    EddyPiVEddyPiV
    Participant

    OK, I was hoping / expecting that there would be an easy way to get this.

    Gemini helped me.
    This is the function I added to my functions.php:

    /**
     * Gets a specific query string value from the URL.
     *
     * @param string $param_name The name of the query parameter to retrieve.
     * @return string|null The sanitized value or null if the parameter is not found.
     */
    function get_query_param($param_name) {
        if (isset($_GET[$param_name])) {
            // Use sanitize_text_field to prevent security issues.
            return sanitize_text_field($_GET[$param_name]);
        }
    
        return null;
    }
    

    With mb.get_query_param('username') it's working nicely.

    Perhaps others may benefit of this code, too.

    in reply to: How to get the current url, so that I can redirect? #48668
    EddyPiVEddyPiV
    Participant

    Thanks Peter, it's working now.

    in reply to: How to get the current url, so that I can redirect? #48659
    EddyPiVEddyPiV
    Participant

    Thanks Peter.

    But then still, I get the error message 'Invalid request. Please try again' It's caused by the Redirect option. The URL I specify there is correct, pasting it to the url bar of the prowser shows the page correctly, but the redirect doesn't.

    How to have the redirect working properly?

Viewing 15 posts - 1 through 15 (of 166 total)