Forum Replies Created

Viewing 15 replies - 1 through 15 (of 79 total)
  • Plugin Author Paulo Pinto

    (@psrpinto)

    If you want to redirect the user to another form, you can use WordPress’s login_url filter to override the URL WordPress redirects the user to.

    After your form is handled, you need to redirect the user back to the openid-authenticate route, which will land them on the AuthenticateHandler of the OIDC server plugin.

    Plugin Author Paulo Pinto

    (@psrpinto)

    I believe the sequence you described is correct. When you make a request to the authorization endpoint and the user is not logged-in, they will be redirected to the “authenticate” route (the code for that is here).

    In the authenticate route, they will be redirected to WordPress’s login page, from where they should be able to register for an account. After registration, they should be redirected back to the oidc flow. If that is not the case, there might be a bug in the plugin.

    Plugin Author Paulo Pinto

    (@psrpinto)

    I think this might be related to this issue: https://github.com/Automattic/wp-openid-connect-server/issues/81

    Could you try changing the permalink structure as described in the issue and see if the problem persists?

    Plugin Author Paulo Pinto

    (@psrpinto)

    Hi Matteo, I’m not sure I understand exactly what you’re attempting to do. You mention:

    I need to ask the client for authorization which will respond to me with a code, so I have to insert an additional call before logging in

    When you say you need to insert an additional call, I’m assuming you mean on the OIDC client? In that case, the way to do that would likely depend on which OIDC client you’re using. Apologies in advance if I’m misunderstanding something.

    Concerning your second question, about redirecting to a registration page, would you mind opening a new forum post? Thank you.

    Plugin Author Paulo Pinto

    (@psrpinto)

    Hi Matteo,

    That is correct, you can use the oidc_user_claims filter for that purpose.

    It doesn’t look like that option is available in the site editor indeed. You could use a plugin like disable-unused-block-editor-blocks or block-visibility, or there might be others.

    Alternatively, it might be possible to do this in JavaScript, through something like the following, but I wasn’t able to make it work myself.

    wp.blocks.unregisterBlockType( 'core/html' );

    It might also be possible to do so in PHP, using the allowed_block_types_all filter, but I haven’t tested it myself.

    Hi @pabloai,

    The error you’re seeing means that the server where your site is hosted does not have enough memory to function correctly. You might be able to temporarily fix the issue by restarting the server through your hosting provider’s administration panel. If you don’t know how to access your hosting administration panel, you’ll need to search their documentation or get in touch with their support.

    However, restarting the server will likely only temporarily fix the issue. A permanent fix probably requires upgrading to a server with more memory. You can likely contact your hosting provider customer support for this.

    Hi @devoantor ,

    You can prevent blocks from appearing in the list of available blocks as follows:

    1. Open a post for editing
    2. Click the vertical three dots icon on top right of the editor
    3. Click Preferences (at the bottom)
    4. Click Blocks
    5. Uncheck the Custom HTML block
    • This reply was modified 1 year, 6 months ago by Paulo Pinto.

    Hi @sharonbeyond,

    By the middle of every single post, do you mean in between the content of the post, in the post page itself? Or do you mean it would show between posts, in a page that shows the listing of posts?

    I’m assuming you want it to display in between the content of the post, in a single post page. In the example page you linked above, are you referring to the “?Necesita ayuda para entender la Biblia?” section?

    To display content in between a post, WordPress needs to know exactly where you want it to display. (After three paragraphs? In the “middle” of all paraghraphs? etc).

    The easiest way to achieve this is to edit the post so that it contains the block in the exact position you want it. You’d have to this for all existing posts, and for all new posts going forward.

    I’m sure there would be ways to achieve this automatically, without requiring editing every post, but that would likely involve coding a plugin. Alternatively, you could search the plugin directory for existing plugins that achieve this, I found this one which looks like it could do that, but I haven’t tested it myself.

    • This reply was modified 1 year, 6 months ago by Paulo Pinto.

    Hi @cyclope05

    I recommend asking at the WooCommerce plugin support, so the plugin’s developers and support community can help you.

    If I understood correctly, you want the postDate value to be assigned to the current date at the moment the user adds the block to the page, and you don’t want it to be changed when the user modifies the content of the block.

    I think to achieve this you can’t assign a default value to the postDate attribute, in the attributes declaration. Instead, you should set the value in the useEffect, unless it’s already set:

    attributes:
        postDate: {
            type: "string",
        },
        // ...
    }
    
    React.useEffect(() => {
        if (!blockId) {
            setAttributes({ blockId: clientId });
        }
        if (!postDate) {
            setAttributes({ postDate: moment().tz("Europe/Paris").locale("fr").format() });
        }
    }, []);
    

    Hi @kimosabe1,

    I tried this on a fresh WordPress install, and I can confirm pasting the youtube link automatically creates an embed, both in the block editor, and in the classic editor.

    Considering it worked on your friend’s site, and in my test site, it must be something about the WordPress install of your hosting provider. Maybe it automatically installs certain plugins? When you create a new site through plesk, could you verify that no plugins are enabled?

    Poderia por favor verificar se ao alterar o autor através do editor em massa, a lista completa de autores está disponível?

    Para utilisar o editor em massa, deve fazer o seguinte:

    1. Ir a https://ecofeiragranjaviana.com.br/wp-admin/edit.php
    2. Selecionar o(s) post(s)
    3. Clicar A??es em massa, e selecionar Editar
    4. Clicar na lista de autores
    5. Alterar o autor
    6. Clicar no bot?o Atualizar

    Plugins can run arbitrary code, so you could invoke the existing script from a new plugin you create, or you could adapt an existing plugin to call the script.

    Let’s assume you created a new plugin. In that plugin’s plugin.php you can add a function that invokes the script, then call that function using the hooks system, as I mentioned above:

    function run_script() {
       // Here you would invoke the script
    }
    
    // (Editor formats this wrongly, should be a single line)
    add_action( 'init', 'call_script' );

    The way you invoke the script in the run_script() function will depend on how the script itself is programmed. If it exposes a function you can call, you would just call said function from your run_script() function:

    function run_script() {
        require_once( 'my_script.php' );
        function_from_script();
    }

    If the script does not expose a function but instead runs as an inline script, importing its code will automatically run it:

    function run_script() {
        require_once( 'my_script.php' );
    }

    I hope this helps.

    • This reply was modified 1 year, 6 months ago by Paulo Pinto.
    • This reply was modified 1 year, 6 months ago by Paulo Pinto.

    (English reply below)

    Para alterar o autor de um post, deve editar o Post, e utilisar a caixa AUTOR do lado direito do editor:

    To edit the author of the post, you can edit the Post, then use the Author box on the right side of the editor, as per the image above.

Viewing 15 replies - 1 through 15 (of 79 total)