VvvebJs
VvvebJs copied to clipboard
builder.js showing error and page is not saving after editing.
When I set up the project I found below error in my browser console:
Uncaught ReferenceError: file is not defined
anonymous http://localhost/vvveb/VvvebJs/vvvebjs/libs/builder/builder.js line 34 > Function:3
tmpl http://localhost/vvveb/VvvebJs/vvvebjs/libs/builder/builder.js:51
addPage http://localhost/vvveb/VvvebJs/vvvebjs/libs/builder/builder.js:1902
addPages http://localhost/vvveb/VvvebJs/vvvebjs/libs/builder/builder.js:1908
And while I click the save boutton I see these messages:
Object not found!
The requested URL was not found on this server.
The link on the
<a href="http://localhost/vvveb/VvvebJs/vvvebjs/editor.php">referring
page</a> seems to be wrong or outdated. Please inform the author of
<a href="http://localhost/vvveb/VvvebJs/vvvebjs/editor.php">that page</a>
about the error.
If you think this is a server error, please contact the webmaster.
Error 404
localhostApache/2.4.46 (Win64) OpenSSL/1.1.1g PHP/7.2.33
-> I have changed my editor.html to editor.php -> And my editor.php and save.php are in same directory.
There seems to be some minor tweaks required to make this work. It's an amazing tool... thanks to @givanz here is what I did to edit and save html files.
Step 1: Download the code, unzip the folder and move it to server webroot. Rename the folder to vvveb, if you want (you can rename it to anything you want).
Step 2: Open editor.html and change data-vvveb-url="/admin/?module=editor/editor&action=save"
to data-vvveb-url="save.php"
.
Step 3: Open save.php and change sanitizeFileName($_POST['file']);
to sanitizeFileName($_POST['fileName']);
Step 4: Save the changes and Voilà!
Hope this helps....Cheers!!! 🥳 👏 🙏
hi, I did what you told so now I have my GitHub map with a website template within that map is the map vvveb for the website editor right? So how can I start editing my website index.html template? (I don't know anything about coding...)
@shabeebrizvi
@shabeebrizvi Any tips on also getting the 'New Page' button to work?
I am serving with php -S localhost:8000
and entering /
or /demo
or demo
as the Folder. Entries are created in the Pages area but there is a crash in all cases
builder.js:2191 Uncaught TypeError: Cannot read property 'url' of undefined
at Object.loadPage (builder.js:2191)
at the code
this.currentPage = name;
var url = this.pages[name]['url'];