Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] "Call to a member function getContent() on null" - when building custom module #44300

Closed
kyuzo1 opened this issue Oct 17, 2024 · 1 comment

Comments

@kyuzo1
Copy link

kyuzo1 commented Oct 17, 2024

Steps to reproduce the issue

Home Dashboard > Content > Site Modules > New > Custom

Expected result

To open text editor for module editing

Actual result

An error has occurred.

0 Call to a member function getContent() on null 

Call Stack

Function Location

1 () JROOT/plugins/editors-xtd/paytoreadmore/paytoreadmore.php:50
2 plgButtonPayToReadmore->onDisplay() JROOT/libraries/src/Editor/Button/ButtonsRegistry.php:118
3 Joomla\CMS\Editor\Button\ButtonsRegistry->initRegistry() JROOT/libraries/src/Editor/AbstractEditorProvider.php:62
4 Joomla\CMS\Editor\AbstractEditorProvider->getButtons() JROOT/libraries/src/Editor/AbstractEditorProvider.php:96
5 Joomla\CMS\Editor\AbstractEditorProvider->displayButtons() JROOT/plugins/editors/none/src/Provider/EditorNoneProvider.php:123
6 Joomla\Plugin\Editors\None\Provider\EditorNoneProvider->display() JROOT/libraries/src/Editor/Editor.php:211
7 Joomla\CMS\Editor\Editor->display() JROOT/libraries/src/Form/Field/EditorField.php:250
8 Joomla\CMS\Form\Field\EditorField->getInput() JROOT/libraries/src/Form/FormField.php:482
9 Joomla\CMS\Form\FormField->__get() JROOT/libraries/src/Form/Field/TextareaField.php:94
10 Joomla\CMS\Form\Field\TextareaField->__get() JROOT/libraries/src/Form/Field/EditorField.php:138
11 Joomla\CMS\Form\Field\EditorField->__get() JROOT/libraries/src/Form/Form.php:458
12 Joomla\CMS\Form\Form->getInput() JROOT/administrator/components/com_modules/tmpl/module/edit.php:120
13 include() JROOT/libraries/src/MVC/View/HtmlView.php:416
14 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/libraries/src/MVC/View/HtmlView.php:204
15 Joomla\CMS\MVC\View\HtmlView->display() JROOT/administrator/components/com_modules/src/View/Module/HtmlView.php:110
16 Joomla\Component\Modules\Administrator\View\Module\HtmlView->display() JROOT/libraries/src/MVC/Controller/BaseController.php:697
17 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_modules/src/Controller/DisplayController.php:85
18 Joomla\Component\Modules\Administrator\Controller\DisplayController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:730
19 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
20 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
21 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:150
22 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:195
23 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:306
24 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:58
25 require_once() JROOT/administrator/index.php:32

System information (as much as possible)

PHP Version 8.3.11
System Linux ############ 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64
Build Date Sep 2 2024 12:07:10
Build System Linux buildfarm06-new.corp.cloudlinux.com 4.18.0-553.8.1.el8_10.x86_64 #1 SMP Tue Jul 2 07:26:33 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux


PHP Built On Linux ############ 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64
Database Type mysql
Database Version 8.0.39-cll-lve
Database Collation utf8mb4_unicode_ci
Database Connection Collation utf8mb4_0900_ai_ci
Database Connection Encryption None
Database Server Supports Connection Encryption Yes
PHP Version 8.3.11
Web Server LiteSpeed
WebServer to PHP Interface litespeed
Joomla! Version Joomla! 5.2.0 Stable [ Uthabiti ] 15-October-2024 16:00 GMT
Joomla Backward Compatibility Plugin Enabled ()


Additional comments

Happens when any editor is selected

Editing /plugins/editors-xtd/paytoreadmore/paytoreadmore.php

Commenting out this function resolves the issue: function onDisplay($name){...}

@HLeithner
Copy link
Member

This seems to be a 3rd party extension and not core related, please contact the vendor to solve this issue.

For a quick fix you can disable the editor plugin with this function.

I'm closing this as not a core issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants