Seeking Help with Dolibarr Core Template Implementation
-
Hello !
I hope this message finds you well. I'm reaching out for some advice on a particular issue I'm facing with Dolibarr. I'm trying to implement invoice and quote templates into the core of Dolibarr, specifically within the /htdocs/core/modules/ directory, which, according to the Dolibarr wiki, is an official practice.
My challenge lies in figuring out how to effectively utilize this directory in a manner similar to the /custom/ subdirectory, especially in a Dolibarr installation on Cloudron. I'm curious if anyone here has navigated this path before and could offer some insights or guidance.
Currently, the only workaround seems to be a complete reinstall of Dolibarr using a LAMP stack, but this approach is quite cumbersome and I'm hoping to avoid it. A potential solution I'm considering is creating a link in the /data directory that points to the /modules folder. Do you think this would be a viable approach?
Any advice, tips, or shared experiences in this area would be incredibly valuable to me. I'm all ears for any suggestions or guidance you might have.
Thank you so much for taking the time to read my post and for any help you can offer.
Warm regards,
-
Ok, I used LAMP stack and it works.
Once I had my LAMP stack set up, I proceeded with the migration process. Here's a detailed breakdown of the steps I followed to ensure a smooth transition:
- Database Backup: The first step involved creating a backup of the SQL database from the old server. This is crucial to ensure that all data is securely transferred without any loss.
- Copying Data: Next, I archived the dolibarrdata directory into a .tar.gz file. I did the same for the /modules directory located in the core. This step is essential to retain all the configurations and customizations.
- Preparing the LAMP Container: In the root directory of the LAMP container (specifically in /data), I created an /import directory. This was done to facilitate the import of the previously backed-up data.
- Importing the Database: Before installing Dolibarr, I imported the database into the LAMP stack. It's important to do this step prior to the installation to ensure the new setup recognizes all your existing data.
- Cloning Dolibarr: I used Git to clone the 18.0 branch of Dolibarr. While doing this, I made sure to use the option for a single branch and a depth of 1 to avoid downloading unnecessary data.
- Dolibarr Installation: With the database in place and the Dolibarr code ready, I proceeded with the installation. It's critical to use the LAMP credentials provided during this step. Note that the database is in MySQL and not in localhost. Also, ensure that Dolibarr points to the imported dolibarrdata.
- Final Adjustments: The last step involved adjusting the path since Dolibarr was now at the root instead of in the htdocs directory. This is an important modification to ensure that Dolibarr functions correctly in its new environment.
By following these steps, I successfully migrated Dolibarr to a more flexible setup using a LAMP stack. This approach might seem a bit complex, but it offers greater control and customization options, which were lacking in the standard Cloudron setup.
Hope this detailed walkthrough helps anyone facing similar challenges. Feel free to ask if you have any questions or need further clarifications.