nadilhassan / humhub-news-module

This module allows you to publish news stories to any Space - you can upload a photo and select a layout.
15 stars 8 forks source link

Cannot save news #14

Closed victor-moreno closed 7 years ago

victor-moreno commented 7 years ago

Hi, I cannot save news. I have installed the module in HH v1.2.0b4 (humhub/protected/modules/news) and activated it in the Welcome Space. I can start edition of a new news, preview works, but I cannot save the post. humhub logs are attached, the server log says:

500 "POST /s/welcome-space/news/news/create HTTP/1.1\ - -

which suggests that the save button points to a non-existent page I have 'enablePrettyUrl' => true, but doesn't work either with false.

The "Edit Author" search doesn't work either, at least registered users are not found.

I would appreciate some help since this module looks really nice in the demo.

Victor

news-save-error.log.txt

nadilhassan commented 7 years ago

Hi

Oops, I just replicated the issue. the problem is in 1.2 the default humhub upload file has been disabled ..that make the problem.

@buddh4 Why it has been removed?

buddh4 commented 7 years ago

Which upload file do you mean, there were several changes with the file api. Perhaps you can add the line of code which is failing.

nadilhassan commented 7 years ago

HI Julian, yeah as you there were some changes in file api..which broke the function. I Have updated with the new code..It's working now.

victor-moreno commented 7 years ago

Hi, I have updated to 1.2.0 and still not working for me. I have several humhub installs, some fresh ones and this news module does't work

imageGuid in NewsController.php seems undefined when there are no news

The search for author in "Assign an author" is not working either

Here is the error log:

exception 'yii\base\ErrorException' with message 'Undefined variable: imageGuid' in /var/www/html/humhub/protected/modules/news/controllers/NewsController.php:94 Stack trace: #0 /var/www/html/humhub/protected/modules/news/controllers/NewsController.php(94): yii\base\ErrorHandler->handleError(8, 'Undefined varia...', '/var/www/html/c...', 94, Array) #1 [internal function]: humhub\modules\news\controllers\NewsController->actionCreate() #2 /var/www/html/humhub/protected/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array) #3 /var/www/html/humhub/protected/vendor/yiisoft/yii2/base/Controller.php(156): yii\base\InlineAction->runWithParams(Array) #4 /var/www/html/humhub/protected/vendor/yiisoft/yii2/base/Module.php(523): yii\base\Controller->runAction('create', Array) #5 /var/www/html/humhub/protected/vendor/yiisoft/yii2/web/Application.php(102): yii\base\Module->runAction('news/news/creat...', Array) #6 /var/www/html/humhub/protected/vendor/yiisoft/yii2/base/Application.php(380): yii\web\Application->handleRequest(Object(humhub\components\Request)) #7 /var/www/html/humhub/index.php(25): yii\base\Application->run() #8 {main}