Unable to edit server actions on completed project after updating to 6.1.3

Wappler Version : 6.1.3
Operating System : MAC OS X
Server Model: PHP
Database Type: MYSQL
Hosting Type: LINUX

Expected behavior

Unable to edit api configurations. Clicking the Query Builder, Insert Options etc, does nothing.
See screenshots

How to reproduce

  • Open API Server Connection
  • Attempt to edit steps

I suspect this is connected to the other issues mac users may be having. The issue wasn’t noticed in the previous version, but it may have gone unnoticed in version 6.1.2

I am unable to work on request from client. With just launched project.

Screenshot is attached. Clicking Query Builder, Insert Options does nothing.

Hmmm, I can’t replicate it on my Mac. Works fine for me on my end. Couple of suggestions you can try:

1: Save the action, close it and re-open it
2: Try classic view instead of the new visual view

I have closed and reopened before.
When I try to save the api file nothing happens.
If I click the X to close the tab, the popup asks me save or exit without saving.
When I choose save again nothing happens.
When I choose do not save I get the error message popping up in the bottom right.
probObj is not defined. See screenshot.

Unable to recreate it too.
Have you reinstalled from scratch? Maybe something is broken.
Or maybe you can do this to save some time, and the team could take a look on it.

Have you tried the default view for the Action editor to see if that works? Just a brain fart… I often have them and they just blow away in the wind. But then, once in a blue moon, one of them actually honks!

:slight_smile:

1 Like

Tried default view doesn’t help.
I restarted the machine, did a system check everything checked out.
The issue is now issolated to just that 1 server action.
I am rebuilding it and will update the appropriate pages and hope it resolves itself, need to add some additional steps. They are over 70 api server actions in the project and i have spot checked a few and the others seem to work.

I will turn on debug mode whether rebuilding it works or not and send the issue in the event it is not issolated to me.

1 Like

What about right click on the API and duplicate it (just for backup)
And try deleting step by step the actions?
So in that way you can see if there’s an especific movement that has a strange behaviour.

Also if your api has no sensitive data, and you want to share here the steps, you can right click, open in code view and paste it here (How to format code in your posts)

I duplicated previously but it had the same issue, took a look in code view and compared with other files but didn’t see anything obviously wrong.

It wouldn’t allow me to delete steps either.
I was able to recreate without issue and add the additional steps - so I’m relatively happy just wouldn’t want this to happen with a more complex api.

API code is below.

<?php
require('../../../dmxConnectLib/dmxConnect.php');


$app = new \lib\App();

$app->define(<<<'JSON'
{
  "meta": {
    "options": {
      "linkedFile": "/infocentre.php",
      "linkedForm": "uploadDoc"
    },
    "$_POST": [
      {
        "type": "text",
        "fieldName": "doc_title",
        "options": {
          "rules": {
            "core:required": {
              "param": ""
            }
          }
        },
        "name": "doc_title"
      },
      {
        "type": "text",
        "fieldName": "public",
        "name": "public"
      },
      {
        "type": "file",
        "fieldName": "file",
        "name": "file",
        "sub": [
          {
            "name": "name",
            "type": "text"
          },
          {
            "name": "type",
            "type": "text"
          },
          {
            "name": "size",
            "type": "number"
          },
          {
            "name": "error",
            "type": "text"
          }
        ],
        "outputType": "file"
      },
      {
        "type": "text",
        "fieldName": "doc_owner",
        "name": "doc_owner"
      },
      {
        "type": "text",
        "fieldName": "doc_status",
        "name": "doc_status"
      },
      {
        "type": "text",
        "fieldName": "doc_type",
        "multiple": true,
        "name": "doc_type"
      },
      {
        "type": "text",
        "name": "doc_description"
      },
      {
        "type": "text",
        "name": "saved_name"
      },
      {
        "type": "text",
        "name": "file_name"
      },
      {
        "type": "text",
        "name": "file_type"
      },
      {
        "type": "text",
        "name": "file_size"
      },
      {
        "type": "datetime",
        "name": "dateadded"
      },
      {
        "type": "text",
        "name": "status"
      },
      {
        "type": "text",
        "name": "lastupdatedby"
      },
      {
        "type": "datetime",
        "name": "lastupdated"
      }
    ]
  },
  "exec": {
    "steps": [
      {
        "name": "identity",
        "module": "auth",
        "action": "identify",
        "options": {
          "provider": "security"
        },
        "output": true,
        "meta": []
      },
      {
        "name": "loginData",
        "module": "dbconnector",
        "action": "single",
        "options": {
          "connection": "lfclients001",
          "sql": {
            "type": "select",
            "columns": [
              {
                "table": "import_Accounts_Contacts_WK",
                "column": "PolicyNumber",
                "recid": 1
              },
              {
                "table": "import_Accounts_Contacts_WK",
                "column": "Name",
                "recid": 2
              },
              {
                "table": "import_Accounts_Contacts_WK",
                "column": "Email",
                "recid": 3
              },
              {
                "table": "import_Accounts_Contacts_WK",
                "column": "id",
                "recid": 4
              },
              {
                "table": "import_Accounts_Contacts_WK",
                "column": "National ID",
                "recid": 5
              },
              {
                "table": "import_Accounts_Contacts_WK",
                "column": "Contact Type",
                "recid": 6
              },
              {
                "table": "import_Accounts_Contacts_WK",
                "column": "Type",
                "recid": 7
              },
              {
                "table": "import_Accounts_Contacts_WK",
                "column": "username",
                "recid": 8
              },
              {
                "table": "import_Accounts_Contacts_WK",
                "column": "Login ID",
                "recid": 9
              }
            ],
            "params": [
              {
                "operator": "equal",
                "type": "expression",
                "name": ":P1",
                "value": "{{identity}}",
                "test": ""
              }
            ],
            "table": {
              "name": "import_Accounts_Contacts_WK"
            },
            "joins": [],
            "wheres": {
              "condition": "AND",
              "rules": [
                {
                  "id": "import_Accounts_Contacts_WK.Login ID",
                  "field": "import_Accounts_Contacts_WK.Login ID",
                  "type": "double",
                  "operator": "equal",
                  "value": "{{identity}}",
                  "data": {
                    "table": "import_Accounts_Contacts_WK",
                    "column": "Login ID",
                    "type": "number",
                    "columnObj": {
                      "type": "integer",
                      "default": "0",
                      "primary": false,
                      "nullable": false,
                      "name": "Login ID"
                    }
                  },
                  "operation": "=",
                  "table": "import_Accounts_Contacts_WK"
                }
              ],
              "conditional": null,
              "valid": true
            },
            "query": "select `PolicyNumber`, `Name`, `Email`, `id`, `National ID`, `Contact Type`, `Type`, `username`, `Login ID` from `import_Accounts_Contacts_WK` where `import_Accounts_Contacts_WK`.`Login ID` = ?"
          }
        },
        "output": true,
        "meta": [
          {
            "type": "text",
            "name": "PolicyNumber"
          },
          {
            "type": "text",
            "name": "Name"
          },
          {
            "type": "text",
            "name": "Email"
          },
          {
            "type": "number",
            "name": "id"
          },
          {
            "type": "text",
            "name": "National ID"
          },
          {
            "type": "text",
            "name": "Contact Type"
          },
          {
            "type": "text",
            "name": "Type"
          },
          {
            "type": "text",
            "name": "username"
          },
          {
            "type": "number",
            "name": "Login ID"
          }
        ],
        "outputType": "object"
      },
      {
        "name": "upload",
        "module": "upload",
        "action": "upload",
        "options": {
          "path": "/uploads",
          "fields": "{{$_POST.file}}",
          "throwErrors": true,
          "template": "{{loginData.username}}-{{$_POST.doc_type}}-{{$_POST.secondsunix}}{ext}"
        },
        "meta": [
          {
            "name": "name",
            "type": "text"
          },
          {
            "name": "path",
            "type": "text"
          },
          {
            "name": "url",
            "type": "text"
          },
          {
            "name": "type",
            "type": "text"
          },
          {
            "name": "size",
            "type": "text"
          },
          {
            "name": "error",
            "type": "number"
          }
        ],
        "outputType": "file",
        "output": true
      },
      {
        "name": "insert",
        "module": "dbupdater",
        "action": "insert",
        "options": {
          "connection": "lfclients001",
          "sql": {
            "type": "insert",
            "values": [
              {
                "table": "uploads",
                "column": "doc_owner",
                "type": "text",
                "value": "{{$_POST.doc_owner}}"
              },
              {
                "table": "uploads",
                "column": "doc_title",
                "type": "text",
                "value": "{{$_POST.doc_title}}"
              },
              {
                "table": "uploads",
                "column": "doc_type",
                "type": "text",
                "value": "{{$_POST.doc_type}}"
              },
              {
                "table": "uploads",
                "column": "doc_description",
                "type": "text",
                "value": "{{$_POST.doc_description}}"
              },
              {
                "table": "uploads",
                "column": "saved_name",
                "type": "text",
                "value": "{{upload.name}}"
              },
              {
                "table": "uploads",
                "column": "file_name",
                "type": "text",
                "value": "{{upload.path}}"
              },
              {
                "table": "uploads",
                "column": "file_type",
                "type": "text",
                "value": "{{upload.type}}"
              },
              {
                "table": "uploads",
                "column": "file_size",
                "type": "text",
                "value": "{{upload.size}}"
              },
              {
                "table": "uploads",
                "column": "dateadded",
                "type": "datetime",
                "value": "{{NOW}}"
              },
              {
                "table": "uploads",
                "column": "status",
                "type": "text",
                "value": "{{$_POST.doc_status}}"
              },
              {
                "table": "uploads",
                "column": "public",
                "type": "text",
                "value": "{{$_POST.public}}"
              },
              {
                "table": "uploads",
                "column": "lastupdatedby",
                "type": "text",
                "value": "{{loginData.username}}"
              },
              {
                "table": "uploads",
                "column": "lastupdated",
                "type": "datetime",
                "value": "{{NOW}}"
              }
            ],
            "table": "uploads",
            "returning": "id",
            "query": "insert into `uploads` (`dateadded`, `doc_description`, `doc_owner`, `doc_title`, `doc_type`, `file_name`, `file_size`, `file_type`, `lastupdated`, `lastupdatedby`, `public`, `saved_name`, `status`) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
            "params": [
              {
                "name": ":P1",
                "type": "expression",
                "value": "{{$_POST.doc_owner}}",
                "test": ""
              },
              {
                "name": ":P2",
                "type": "expression",
                "value": "{{$_POST.doc_title}}",
                "test": ""
              },
              {
                "name": ":P3",
                "type": "expression",
                "value": "{{$_POST.doc_type}}",
                "test": ""
              },
              {
                "name": ":P4",
                "type": "expression",
                "value": "{{$_POST.doc_description}}",
                "test": ""
              },
              {
                "name": ":P5",
                "type": "expression",
                "value": "{{upload.name}}",
                "test": ""
              },
              {
                "name": ":P6",
                "type": "expression",
                "value": "{{upload.path}}",
                "test": ""
              },
              {
                "name": ":P7",
                "type": "expression",
                "value": "{{upload.type}}",
                "test": ""
              },
              {
                "name": ":P8",
                "type": "expression",
                "value": "{{upload.size}}",
                "test": ""
              },
              {
                "name": ":P9",
                "type": "expression",
                "value": "{{NOW}}",
                "test": ""
              },
              {
                "name": ":P10",
                "type": "expression",
                "value": "{{$_POST.doc_status}}",
                "test": ""
              },
              {
                "name": ":P11",
                "type": "expression",
                "value": "{{$_POST.public}}",
                "test": ""
              },
              {
                "name": ":P12",
                "type": "expression",
                "value": "{{loginData.username}}",
                "test": ""
              },
              {
                "name": ":P13",
                "type": "expression",
                "value": "{{NOW}}",
                "test": ""
              }
            ]
          }
        },
        "meta": [
          {
            "name": "identity",
            "type": "text"
          },
          {
            "name": "affected",
            "type": "number"
          }
        ],
        "output": true
      }
    ]
  }
}
JSON
);
?>

Do you have the debug log as well?

This will be solved in the next update

3 Likes

Bug Report #1706996996563

Nothing seems to be attached on this end, but I’m assumming it was posted somewhere in the back end with this report number.

In some cases you need to manually search and upload the wappler log file located on the Wappler folder.

Saying that, I think the problem relies here:

    {
        "type": "file",
        "fieldName": "file",
        "name": "file",
        "sub": [
          {
            "name": "name",
            "type": "text"
          },
          {
            "name": "type",
            "type": "text"
          },
          {
            "name": "size",
            "type": "number"
          },
          {
            "name": "error",
            "type": "text"
          }
        ],
        "outputType": "file"
      },

Deleting that, fix the issue, at least for me

I recreated it but will make the change and see if it works for me as well.

This is now fixed in the latest Wappler 6.2

This topic was automatically closed after 20 hours. New replies are no longer allowed.