13
@burning
Is your xoops install a fresh 2.4.4 one or an upgraded one???
I have been going crazy to reproduce issue. On new xoops 2.4.x install I had no problems installing xnews and blocks they all work fine. Found problem on an upgraded xoops from 2.3.x to 2.4.x.
Somehow Constants are not loaded. Have not understood why nor where they get lost.
The solution for now is adding these few lines of code to all or in nonworking block's files in xnews/blocks:
if (!defined('NW_MODULE_PATH')) {
define("NW_SUBPREFIX", "nw");
define("NW_MODULE_DIR_NAME", "xnews");
define("NW_MODULE_PATH", XOOPS_ROOT_PATH . "/modules/" . NW_MODULE_DIR_NAME);
define("NW_MODULE_URL", XOOPS_URL . "/modules/" . NW_MODULE_DIR_NAME);
define("NW_UPLOADS_NEWS_PATH", XOOPS_ROOT_PATH . "/uploads/" . NW_MODULE_DIR_NAME);
define("NW_TOPICS_FILES_PATH", XOOPS_ROOT_PATH . "/uploads/" . NW_MODULE_DIR_NAME . "/topics");
define("NW_ATTACHED_FILES_PATH", XOOPS_ROOT_PATH . "/uploads/" . NW_MODULE_DIR_NAME . "/attached");
define("NW_TOPICS_FILES_URL", XOOPS_URL . "/uploads/" . NW_MODULE_DIR_NAME . "/topics");
define("NW_ATTACHED_FILES_URL", XOOPS_URL . "/uploads/" . NW_MODULE_DIR_NAME . "/attached");
}
Right after:
if (!defined('XOOPS_ROOT_PATH')) {
die('XOOPS root path not defined');
}
in news_latestnews.php you shoud also add the above xoops_root_path right after the commented text.
If any coder has experienced similar issues with upgraded xoops it would be nice to have some suggestions... :)
To make same changes to clones go to "Clone Manager" and "Force upgrade"
Will be fixed in RC2.