How to fix open project errors due to invalid names

11

Stats

790 visits, 970 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 18 Jul, 2024. Last updated 29 Aug, 2024

In the past, Construct did not correctly validate the names of all items in a project. For example it would incorrectly allow characters not allowed in filenames, such as slashes and question marks, or names which start or end with a space which also count as invalid due to the restrictions of file naming. This could cause problems such as being unable to save your project to a folder, as files using invalid names could not be created.

Construct has now been updated to correctly validate all the names provided. Therefore this problem should not happen any more with new projects, or existing projects that already use valid names. However it cannot always automatically update invalid names used in projects saved with older versions of Construct, and this can prevent Construct being able to open the project. If you see an error message about this which links to this page, then follow these steps to correct the problem.

Fixing a project with invalid names involves the following steps:

  1. Open the project in an older release of Construct where it can be successfully opened.
  2. Go through the Project Bar and rename any items with invalid names. If you use animation folders in Sprite objects, you may also need to check animation folder names.
  3. Save the project
  4. Re-open the project in the newer release. If it successfully opens, the project has been updated correctly. If it shows another error message, you may need to repeat these steps and check the names again.

If you see an error message that refers to a name starting or ending with a space, this is likely due to a change in r389 which now correctly identifies such names as invalid. (It may be surprising, but systems like Windows actually prevent you creating files or folders with names that start or end with a space, as these are considered invalid names.) In order to fix this you should be able to open the project in the previous release r388.2 and follow the steps above. You may need to check names very carefully - due to the way names are displayed you may not be able to see a space in the name until you try to rename the item. To try to help you identify which items have invalid names, the error message may include the name of an item that has an invalid name. However it is only able to show the first invalid name it encountered - you may have to repeat the process several times to identify all invalid names. Names that start or end with a space are often an unintentional mistake, so hopefully your project will not have too many such cases.

If the name is invalid for a different reason, you may need to go back further to older releases of Construct to find the first release that can open it. If you have some other entirely different problem relating to open a project, try also checking for errors in the browser console after seeing an error message: there may be an error stating something like a file is missing in a folder project, in which case you may need to either restore a backup, or try to restore the missing file.

  • 7 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • For an engine willing to deprecate or destroy plugins to "prevent" a "possibility" of future project breaks through Addon SDK v2, you sure do lots of project breaking updates.

    I find it ironic that the goal of Addon SDK v2 is to prevent project breaks by breaking projects with plugins. But when it comes to your updates breaking such projects, you have no regard for them.

      • [-] [+]
      • 1
      • Ashley's avatar
      • Ashley
      • Construct Team Founder
      • 1 points
      • *
      • (0 children)

      This is nothing to do with the Addon SDK v2 - the situation here does not involve addons at all, and I think it's unhelpful to try to bring it up where it's not relevant. Projects using valid names are entirely unaffected by this, which we believe is the vast majority of projects. Projects using invalid names were already broken in certain ways, such as being unable to save folder projects; trying to frame this as us breaking people's projects is also unhelpful. Even though we suspect there are few affected projects, we are taking steps to comprehensively document the changes and help people update their projects - I don't think anyone can reasonably claim that means we have "no regard" for them.

  • Thank you for this update. Little bug fixes light this might be painful, but they are necessary.

  • In the error message, can you add a hyperlink to help users jump to the last older version that can be open project?

      • [-] [+]
      • 0
      • Ashley's avatar
      • Ashley
      • Construct Team Founder
      • 0 points
      • (0 children)

      This article covers a range of possible problems and there isn't one release that you can always go back to. It depends on which version the project was last saved in and what type of invalid names the project uses.

  • É uma ótima atualização, obrigado Construct 3!