typemill / typemill

Typemill is a lightweight, flat-file CMS designed for simple, fast, and flexible website and eBook creation using Markdown.
https://typemill.net
MIT License
427 stars 60 forks source link

add image via visual editor fails #154

Closed ozz-project closed 4 years ago

ozz-project commented 4 years ago

I have selected an image using the visual editor. It is also displayed in the preview, but saving does not work. The section is empty after that. It will not show any errors either Drag and Drop does not work either. I use version 1.3.6.2

trendschau commented 4 years ago

I downloaded 1.3.6.2 and tested again but cannot reproduce the behavior that you reported.

Are you sure that the folders content, media and so on with all the files inside have the rights described in the documentation?

trendschau commented 4 years ago

It is described here and you have to set permissions recursively for the folders and all the content inside: https://typemill.net/getting-started/installation

If that is not the problem, then I need more information, maybe attach the image that you try to upload.

ozz-project commented 4 years ago

i use the php server under windows (php 7.4.5). There should no issue with the rights because the php webserver runs under the the same account as the current user (batch).

trendschau commented 4 years ago

I tested it with XAMPP under windows and recent Firefox locally and it worked fine so I need more information to reproduce or fix it.

Do you see any error in the browser-console or in the network-tab when you add an image or drag an element?

You can also activate the php-error-reporting of the slim-framework by adding the following line to the settings.yaml-file:

displayErrorDetails: true

ozz-project commented 4 years ago

just in case. i did not use xampp. i use the webserver provided by php. php -S localhost:8000 this the error i got.
` c:\htdocs>c:\php\php.exe -S localhost:8000 [....] [Wed May 13 07:05:32 2020] [::1]:50451 Accepted [Wed May 13 07:05:32 2020] Slim Application Error: Type: Error Message: Call to undefined function Typemill\Models\imagecreatefromstring() File: C:\htdocs\system\Models\ProcessImage.php Line: 28 Trace: #0 C:\htdocs\system\Controllers\MediaApiController.php(109): Typemill\Models\ProcessImage->createImage()

1 [internal function]: Typemill\Controllers\MediaApiController->createImage()

2 C:\htdocs\system\vendor\slim\slim\Slim\Handlers\Strategies\RequestResponse.php(40): call_user_func()

3 C:\htdocs\system\vendor\slim\slim\Slim\Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke()

4 C:\htdocs\system\Middleware\RestrictApiAccess.php(24): Slim\Route->__invoke()

5 [internal function]: Typemill\Middleware\RestrictApiAccess->__invoke()

6 C:\htdocs\system\vendor\slim\slim\Slim\DeferredCallable.php(57): call_user_func_array()

7 [internal function]: Slim\DeferredCallable->__invoke()

8 C:\htdocs\system\vendor\slim\slim\Slim\MiddlewareAwareTrait.php(70): call_user_func()

9 C:\htdocs\system\vendor\slim\slim\Slim\MiddlewareAwareTrait.php(117): Slim\Route->Slim{closure}()

10 C:\htdocs\system\vendor\slim\slim\Slim\Route.php(268): Slim\Route->callMiddlewareStack()

11 C:\htdocs\system\vendor\slim\slim\Slim\App.php(503): Slim\Route->run()

12 C:\htdocs\system\Middleware\ValidationErrorsMiddleware.php(27): Slim\App->__invoke()

13 [internal function]: Typemill\Middleware\ValidationErrorsMiddleware->__invoke()

14 C:\htdocs\system\vendor\slim\slim\Slim\DeferredCallable.php(57): call_user_func_array()

15 [internal function]: Slim\DeferredCallable->__invoke()

16 C:\htdocs\system\vendor\slim\slim\Slim\MiddlewareAwareTrait.php(70): call_user_func()

17 C:\htdocs\system\Middleware\OldInputMiddleware.php(29): Slim\App->Slim{closure}()

18 [internal function]: Typemill\Middleware\OldInputMiddleware->__invoke()

19 C:\htdocs\system\vendor\slim\slim\Slim\DeferredCallable.php(57): call_user_func_array()

20 [internal function]: Slim\DeferredCallable->__invoke()

21 C:\htdocs\system\vendor\slim\slim\Slim\MiddlewareAwareTrait.php(70): call_user_func()

22 C:\htdocs\system\vendor\slim\csrf\src\Guard.php(171): Slim\App->Slim{closure}()

23 [internal function]: Slim\Csrf\Guard->__invoke()

24 C:\htdocs\system\vendor\slim\slim\Slim\DeferredCallable.php(57): call_user_func_array()

25 [internal function]: Slim\DeferredCallable->__invoke()

26 C:\htdocs\system\vendor\slim\slim\Slim\MiddlewareAwareTrait.php(70): call_user_func()

27 C:\htdocs\system\vendor\slim\slim\Slim\MiddlewareAwareTrait.php(117): Slim\App->Slim{closure}()

28 C:\htdocs\system\vendor\slim\slim\Slim\App.php(392): Slim\App->callMiddlewareStack()

29 C:\htdocs\system\vendor\slim\slim\Slim\App.php(297): Slim\App->process()

30 C:\htdocs\index.php(7): Slim\App->run()

31 {main}

View in rendered output by enabling the "displayErrorDetails" setting.

[Wed May 13 07:05:33 2020] [::1]:50451 [500]: POST /api/v1/image [Wed May 13 07:05:33 2020] [::1]:50451 Closing `

trendschau commented 4 years ago

Typemill needs some extensions, for example the GD-extension for images, so you have to install them first. I don't have a list of extensions, because all the extensions are usually part of standard webservers.

ozz-project commented 4 years ago

Yeah. I don't know why GD Extension wasn't active. It was a normal default PHP version. Now it works... Thanks you for this quick and great support.