Skip to content

Unable to view tasks - API fails due to Undefined variable $project_format #549

@CCRDude

Description

@CCRDude

Clicking a task I created, I get a loading overlay that never closes.

Project inspector shows the AJAX query failed, with this response payload:

<br />
<b>Warning</b>:  Undefined variable $project_format in <b>/Volumes/Marsvin/Local Sites/de.loheland.www/app/public/wp-content/plugins/wedevs-project-manager/src/Task/Helper/Task.php</b> on line <b>992</b><br />
{"data":{"id":1,"title":"...

So we've got two issue here actually:

  1. If the data returned cannot be passed, something needs to happen - displaying the error or whatever, not keeping the loading overlay there.
  2. Check your code before publishing!

Intelephense shows 10 code errors in the file mentioned above alone. Other files have more. Some because of class variables used that simple have not been defined, but also some that simply don't exist, causing errors like this.

Enable warnings on your development and take them serious!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions