Closed vinumweb closed 1 year ago
Hi
From the error message it seems that file
is not sent through ajax to save.php
, can you please check if all parameters are sent on save in the browser developer console
(Press F12) > network tab
?
It should have file
like in the attached screenshot.
Hi. Can we please chat on discord?
And yes it does show the file
Hi. Can we please chat on discord?
Sorry, I don't have a discord account.
In your screenshot there is a request save
in red at the end of the list, can you please check it? I think there are two requests made one correct and another that is missing data, the one in red.
Are the changes made to the page saved? if you refresh the page the changes persist?
Is the code unchanged? I can't reproduce this error with the code from github.
Hi. Please remain on the page. Its quite urgent. im sorry.
Yes i notices the red one too.
The page is unsaved.
Here is a pictture of the red
Can you also check response
tab to see if it matches the error message that is shown in the alert to make sure that is request is causing the error?
Also please provide a screenshot with console
tab like the one bellow for the failed request to see what code is calling this request.
It matches yes. And thank you for taking youre time to help me!
Here is the console
Omg i just found out its because of my .htaccess file. IM SO SORRY MATE. Thanks for this amazing editor and have a great rest of youre day <3 love
Oh but now new problem. sorry. When i try to create a new file it gives me this:
It seems that it cant create the file itself if it dosnt exist How do i make it create it itself?
Ok. ok ok. It cant create a folder itself. How do i make it able to do that? And when i create a new page with a existing folder i save it but then when i reload the page it dosnt show up
bro im such a idiot. Im so sorry for wasting youre time. Its because i needed to open .php not .html. Tahnks for this project!
Its because i needed to open .php not .html
To load new files you need to use the php version that loads the file list.
It cant create a folder itself. How do i make it able to do that?
In save.php replace
$file = sanitizeFileName($_POST['file']);
with the following code
$file = sanitizeFileName($_POST['file']);
$dir = dirname($file);
if (!is_dir($dir)) {
echo "$dir folder does not exist\n";
if (mkdir($dir, 0777, true)) {
echo "$dir folder was created\n";
} else {
echo "Error creating folder $dir\n";
}
}
I'm glad it works.
Hi again @givanz Can you please help me. How do i save the files and create a new page to a different directory. This is how my files are
My-project
-customers
--customerswebsite(The files should be saved in this directory)
-admin
--vvvebjs (here is the folder with vvvebjs all content inside)
---editor.php
---save.php (save.php should save all files to customers folder)
Thanks in advance.
You need to edit save.php
and editor.php
to change the paths, by default the file is saved to the folder provided in the create page dialog that must be on the same level as save.php
.
You need to delete the folder input from the dialog inside editor.html
and in save.php
replace __DIR__
which is the root folder where save.php
is located with the root folder where you want to save the file My-project/customers/customerswebsite
.
You will also need to change the paths in in editor.php
with the new paths, by default the files are read from demo
and my-pages
.
Replace {my-pages/*.html,demo/*\/*.html, demo/*.html}
with {My-project/customers/customerswebsite/*.html}
The php files are basic examples on how to save the content and are provided to show how to get content from ajax request and load the file list for easier integration into a CMS or website.
If you need more complex functionalities and don't want to integrate the library into a CMS or develop your own you can use Vvveb CMS.
Hi @givanz . Thanks a lot for the answer. I actually found out myself using ChatGPT. The system is now working and it is insane! You really deserve a prize!
Thanks a lot for this amazing project.
-Peter, VinumWeb.com
Hi everyone! Im here to create a system for my customers to create and maintain theyre own website. But i have a problem. I downloaded vvvebjs (NOT THE WHOLE CMS) from github but when i try to save it says undefined array key, and failed to open stream: no such file or directory.
How do i fix this? btw. Thanks alot for this amazing pagebuilder!![image](https://user-images.githubusercontent.com/118371819/213870358-e737c93a-98cf-4558-91e2-bd57d02a4673.png)