Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Còdec

    (@codeccoop)

    I’m closing thins thread after two months without response. If you want to reopen it, please, feel free to open a new thread in this forum. Many thanks.

    Plugin Author Còdec

    (@codeccoop)

    Hi @gerwinverkerk,

    I am trying to reproduce the error, but I can’t. Can you activate the logging mode and share with us the logs from the debug console? Maybe this way we can get more info about what’s going on. Please note that the log can contain sensitive data. Please review it before share it publicly, or you can send the content to hola(at)codeccoop.org.

    By the way, I’m testing with WordPress 6.9. Are you too?

    Thread Starter Còdec

    (@codeccoop)

    Yes, it’s resolved!

    Thank you for your prompt response, good job and excellent plugin

    Plugin Author Còdec

    (@codeccoop)

    I’m glad it’s been resolved!

    Thanks you too, at the end of this thread we have an improved version of the plugin than when we started.

    We hope you enjoy the plugin.

    • This reply was modified 3 months, 1 week ago by Còdec.
    Plugin Author Còdec

    (@codeccoop)

    That’s interesting! This error indicates that you are trying to establish a SSL encrypted connection over HTTP (https://) to a host that does not have a valid SSL certificate, or maybe a self signed certificate, it could be?

    You have two approaches to solve this issue. If the host does not have a certificate, update your backend base URL to work with the http:// schema instead the https://. If the host has a self signed certificate, you have to skip SSL verification. To do that you can copy this code in your WordPress theme functions.php file, or maybe with a plugin like WPCode:

    add_filter( 'http_request_args', 'bazed_skip_nc_ssl_verification', 10, 2 );

    function bazed_skip_nc_ssl_verification( $args, $url ) {
    if ( false !== strpos( $url, 'https://xxxBASEURLxxx' ) ) {
    // Skip SSL verification for NC HTTP requests.
    $args['sslverify'] = false;
    }

    return $args;
    }

    Pleas, if you have to copy this code on your theme, do it with care, I don’t want to break nothing on your WordPress site!

    Plugin Author Còdec

    (@codeccoop)

    Hi @bazed,

    Thanks for the images, but after all, I can’t realize what the problem is with your backend connection, sorry.

    In order to help to debug your problem we’ve released a new version of Forms Bridge with more log coverage, including error logs on the backend ping process. If you upgrade the plugin to version 4.1.2, you may be able to get more context about what’s going on under the hood. We would appreciate it if you could share with us these logs with us. With this information, we may be able to improve the Nextcloud addon and fix the bug, if that is the case.

    Kind regards!

    Plugin Author Còdec

    (@codeccoop)

    Hi @bazed,

    I can’t see the attached image, sorry, but we can understand something from your explanation.

    Let’s see if this help: The CLIENT ID field of the credential should be the username with which you want to authenticate against Nextcloud, the CLIENT SECRET its password. Based on your last message, you are using Bridge as the client_id/username. Does this username exists on your Nextcloud? The Sabre\Dav\Exception\NotFound exception could be explained if no user with this username were found. Maybe you are introducing the username in the NAME field of the credential? This field is an internal label to identify the credential, but it is not used in the authorization request.

    Plugin Author Còdec

    (@codeccoop)

    Hi @bazed,

    With this little information it could be hard to understand what’s going on with your bridge, but lets give it a try.

    I assume you are trying to build a bridge using the template wizard and you are stuck in the backend step, isn’t it? At this step Forms Bridge tries to ping the backend to validate the credentials and without a successful response you can’t go further.

    The wizard process lacks a more in depth logs coverage to make it more debugable. We are working on it. At the same time, if you aren’t seeing nothing on the debug console is because there are no errors, good news.

    Let me explain a little more in detail how the bridge connection is done: Nextcloud exposes its Webdav API (the protocol that uses Forms Bridge to talk with it) under the endpoint /remote.php/dav/files/${username}. This URL path is appended to the base URL of your backend by Forms Bridge. For example, if your have your backend registered with the base URL https://nextcloud.example.coop, the endpoint where the ping will be done will be https://nextcloud.example.coop/remote.php/dav/files/${username}.

    Nextcloud supports to be exposed under a sub-path of a domain, like https://example.coop/nextcloud. If that is the case, the resulting endpoint will be https://example.coop/nextcloud/remote.php/dav/files/${username}. If you are in this second scenario, double check that the backend URL has the sub-path included in such a way that the resulting URL matches one of the examples. Take in mind that the /remote.php/dav/files/${username} is appended dynamically by PHP and the backend base URL should have only the root URL of your Nextcloud.

    Lets talk about the ${username} part of this URLs. This is a variable part that is replaced by the username from the backend credential. The webdav protocol works with the Basic HTTP authentication schema. This means that, to grant access to your private files, the webdav requests should includes an authorization header with your user login and your password. In Forms Bridge you can attach this kind of credentials to the backend. If you are working with the template wizard you’ve probably done it in the previous step. If you are trying to do it manually, start by registering a Basic credential with your login and password and then bind it to the backend. To work properly, the user login should be your username, not your email, and that’s because the username of the credential is the value that Forms Bridge will be use to replace the ${username} part of the endpoint and if you try to authenticate with your user email the resulting URL will be invalid.

    That’s all we can tell to you, I hope it helps. Excuse me for going on so long wit the explanation. If you have more details about your problem maybe we can be able to give you more precise answers.

    We look forward to hearing from you!

    Plugin Author Còdec

    (@codeccoop)

    Hey, @abadu, we mark the thread as resolved if no further questions. Many thanks!

    Plugin Author Còdec

    (@codeccoop)

    Hi @abadu, any news with your listmonk bridge?

    Plugin Author Còdec

    (@codeccoop)

    Hi @abadu!

    Many thanks for your detailed message, this make our work much more easy.

    As an answer to your question, there is no hard coded logic to serialize the bridge payload. This logic is driven by the bridge custom fields and mappers. Using this two features you can control how forms bridge will serialize the payload.

    First of all, one question: Did you set up the bridge manually or with the template wizard? If you did the former, the resulting bridge setup should looks like as follow:

    ## Custom fields

    • attribs.locale: $locale
    • preconfirm_subscriptions: 1 (or 0 if you’re using the Opt-In template)
    • status: enabled (or disabled if you’ve changed the default value)
    • lists[0]: <listId>
    • lists[n]: <listId> (Being n the number the lists you’ve selected in the wizard)

    ## Mappers

    • your-email: email | string
    • your-name: name | string
    • preconfirm_subscriptions: preconfirm_subscriptions | boolean
    • lists[0]: lists[0] | integer
    • lists[n]: lists[n] | integer (Being n the number the lists you’ve selected in the wizard)

    ## Payload

    {
    "attribs": {
    "locale": "string"
    },
    "precomfirm_subscription": "string",
    "status": "string",
    "lists": "integer[]",
    "email": "string",
    "name": "string"
    }

    Based on your explanation, I proposed two hipotesis:

    1. Your bridge has a bad definition for the lists custom field. Maybe something like:
      lists: [5]
    2. Your bridge has a mapper that casts lists payload attribute as JSON. Something like
      lists: lists | JSON

    To solve the first hipotesis, you have to use JSON fingers on the custom field definition to write them to the payload as an array: lists[0], lists[1], and so on.

    If you have a mapper with a json mutation, remove it from the bridge mappers.

    ## Extras

    1. With the attribs field of the payload you can pass custom fields to your subscription requests. By default, Forms Bridge proposes to store the language code (locale), but you can add more at will, whether they come from the form responses or from the bridge custom fields.
    2. You can add an ignore mapper to remove non standard fields from the payload, like your cf-turnstile-response. To do this, open the bridge mappers panel, click on add and set up something like this:
      cf-turnstile-response: cf-turnstile-response | Ignore

    Let us know if you can resolve your errors!

    Plugin Author Còdec

    (@codeccoop)

    Hi @amberexactly,

    We’re glad to hear that you have been able to solve your doubts by yourself. We remain at your disposal if you need further assistance.

    Plugin Author Còdec

    (@codeccoop)

    Hi Dan,

    First of all, the plugin is in development, get it as a beta! We’ve released it to test it on real situations like this, so you are very welcome.

    Second, we’ve released a patch to the version 3.3 of Forms Bridge with the fix of the bug your are reporting, included the typo, many thanks 🤗. Try to update the plugin to the version 3.3.1 and try again. If we don’t have more feedback, we will assume the issue is fixed, otherwise, please, reopen this thread.

    On the other hand, the Odoo JSON-RPC API its complicated: Odoo is modular and models are extended based on the active modules. This is not well resolved by Forms Bread, we know it. We’ve made tests with Odoo 18 and the CRM and Invoicing modules activated and it works fine, but with other configurations some bridges may fail. We are working on a page with documentation to explain it!

Viewing 13 replies - 1 through 13 (of 13 total)