Announcement

Collapse
No announcement yet.

Recreating metadata.php

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Recreating metadata.php

    Hello, I have an issue where if I click 'Rebuild' in administration, the file data/cache/application/metadata.php gets cleared of all code giving error 'bad data stored in metadata.php'. Now my file is empty and I cannot create/change/save anything.
    Is there another way to get the code back in metadata.php without having to press on rebuild because it is not working?

  • #2
    metadata.php is a cache file created by the rebuild process. It is created by Espo based on the metadata json files in your application.

    first try rebuilding from the CLI (terminal) mode issuing this command: php rebuild.php and see if that works

    If not, then metadata is not being correctly generated, and it is most likely a bad metadata json file like entityDefs, clientDefs, etc

    Did you do any modifications to a clientDefs or entityDefs json script ?, if you did, check that script and make sure that its contents are a valid json object

    Comment


    • JosNas
      JosNas commented
      Editing a comment
      I didn't. After wiping the server clean and getting a new terminal to make sure everything is new, I reinstalled a brand new untouched instance of

      EspoCRM on my Cpanel Server using cPanel's Softaculous App Installer. When I enter the link to the CRM the first time (where it is supposed

      to launch the installer), it is giving me Error 500 and the page isn't loading. Log file says bad data stored in metadata.php, so when I check it out

      I find it empty with no code inside it.

      When I manually copy the metadata.php code from my locally installed Espo, the system is opening but I cannot save anything and I get in logs: `PHP Fatal error: Illegal length modifier specified 'f' in s[np]printf call in /public_html/MyEspoFolder/application/Espo/Core/Utils/File/Manager.php on line 344`
      Last edited by JosNas; 11-23-2021, 10:54 AM.

  • #3
    I don't know much about server issues, but if the instance is working in your local installation and not in the server that would meant that there is an issue with the installation or the server configuration.

    I don't use Softaculous or Bitnami or any installers.

    My suggestion would be to install a fresh instance manually in your server and see if that works. https://docs.espocrm.com/administration/installation/

    Comment


    • JosNas
      JosNas commented
      Editing a comment
      Thank you for your help and time! It was an issue with the the server, we changed our server and now it works fine

    • telecastg
      telecastg commented
      Editing a comment
      You're welcome
Working...
X