Comments (8)
Hi again, I believe the problem is related to an incompatibility with Windows, I believe all paths in your php code have slashes in the unix-way so folder creation fails. Am I right? If so, do you think it would be easy making all windows compatible?
from dolibase.
Effectively the problem is due to compatibility in the slashes, but apparently it's not needed to change all slashes in module.py to make it work, just this function in functions.php and php makes it work for the rest:
function getDolibarrRootDirectory()
{
$path = defined(__DIR__) ? __DIR__ : dirname(__FILE__); // should be: .../dolibarr/dolibase/builder/lib
$parts = explode('\\', $path);
array_splice($parts, -3); // remove '/dolibase/builder/lib'
$root_path = implode('\\', $parts);
return $root_path;
}
from dolibase.
I think the warning should be fixed on version 2.9.8.
For the widget/page tutorials, not yet, but it's a pretty cool idea, i guess that a video series about how to code a module from scratch using all dolibase features would be much better, otherwise you can try playing with the left panel & testing the builder features by yourself if you want.
Edit: you will find here a video about widget creation.
from dolibase.
Can you check if it works now? (using github version)
from dolibase.
In fact, the problem was more exactly on this line
https://github.com/AXeL-dev/dolibase/blob/78da77897b023699af9230ec9020c163b8a5dc7b/builder/lib/functions.php#L108
Because /
directory separator works fine on windows too when using PHP, the only matter was that on windows the $path
variable value will be something like: C:\wamp\www\dolibarr\dolibase\builder
with backslashes & on linux : /opt/lamp/htdocs/dolibarr/dolibase/builder
with simple slashes, so since the explode function was using only simple slashes /
to separate the path parts, it simply fails on windows.
Now, it should work properly on both windows & linux.
from dolibase.
Thanks, how can I work directly with the github version? Can I just download the github to the dolibarr folder and do git pulls there for this module? Or how do you normally work with it?
from dolibase.
Welcome, i already updated the Dolibase installer, so you can simply update the module & after that disable + re-enable it (to refresh the dolibase framework files).
Solution 2 (using github version): download dolibase zip file from here then delete your old dolibase folder from your dolibarr root directory (it should be in /dolibarr/dolibase
or /dolibarr/htdocs/dolibase
) & finally replace it with the extracted one from the master.zip file.
from dolibase.
Thanks! It seems to work now. However I keep getting a warning when I select any "Page" item on the left:
Warning: Invalid argument supplied for foreach() in C:\dolibarr\www\dolibarr\htdocs\dolibase\builder\lib\functions.php on line 185
Is this the expected behaviour?
Additionally, do you have some quick tutorial/video about how to use the left panel (e.g. widgets / page) to create a module? Thanks!
from dolibase.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dolibase.