XoopsModules25x / newbb

Forum module for XOOPS
7 stars 19 forks source link

Xoopspoll not working with NewBB #128

Open walkero-gr opened 2 years ago

walkero-gr commented 2 years ago

I am using NewBB 5 Final (05/07/2019) and I had some issues with the XOOPS Poll 1.33 Final (12/12/2011). So I decided to try to install XoopsPoll 1.40 Final, but unfortunately, this doesn't seem to solve the issues.

We have a Polls category in forum, where the polls are created. When I click the button to create a new poll I get the following error

Fatal error: Class 'XoopsModules\Xoopspoll\Helper' not found in /var/www/html/modules/newbb/polls.php on line 83

the url is /modules/newbb/polls.php?op=add&forum=13

Screenshot from 2022-02-20 19-30-54

Tested PHP versions from 5.6 up to 7.3. Installed Xoops version 2.5.10

I also tried the beta versions of XoopsPoll and NewBB but I have various issues with these as well. So, I would like to focus on the Final versions of the modules.

Any recommendations for a fix?

mambax7 commented 2 years ago

I'm so sorry, I didn't see it. Can you try my fork https://github.com/mambax7/xoopspoll and see if it works?

I'll be soon uploading more updates to the XoopsPoll there...

walkero-gr commented 1 month ago

I am so sorry for the late reply. Unfortunately, it still fails with the following error

image

walkero-gr commented 1 month ago

Probably the issue is that it requires PHP 7.4 but I am using PHP 7.3. The reason why I haven't upgraded is that Xoops 2.5.10 doesn't work with PHP 7.4 and fails.

walkero-gr commented 1 month ago

As I am working to make XoopsPoll work with PHP 7.3 I stumble upon methods in the code that do not exist any more. For example, the $this->db->isResultSet() does not exist and the \XoopsBlock::getByModule() cannot be used because it includes XOOPS_ROOT_PATH . '/kernel/block.php' which has that method as deprecated, instead including the XOOPS_ROOT_PATH . '/class/xoopsblock.php'.

I might be wrong, but I believe the PHP version is the least of the XoopsPoll module problems.

mambax7 commented 1 month ago

The isResultSet() is part of XOOPS 2.5.11 You should upgrade to XOOPS 2.5.11, and it should work on PHP 7.3

XOOPS 2.5.12 will require PHP 7.4+

walkero-gr commented 1 month ago

Xoops 2.5.11 has smarty 3 and I am not sure how much of work is required. If I am not wrong this is a breaking change. I am planning to do an update test this week though, and see how much work will be needed.

mambax7 commented 1 month ago

The Upgrade routine to XOOPS 2.5.11 should do the majority of work for the conversion to Smarty 3. The might be some manual work required, but the Upgrade's "preflight" will tell you what to do. If you get stuck, please let us know, and we'll try to help

walkero-gr commented 1 month ago

@mambax7 Thank you so much. I will let you know how it goes.

walkero-gr commented 1 month ago

XOOPS 2.5.11 works, as much as I have seen with PHP 7.3 but XoopsPoll doesn't. To make it work, somehow well, it requires PHP 8.1+ and there are still issues. I opened a different issue at https://github.com/mambax7/xoopspoll/issues/10