181
Cesagonchu
Re: Newbb 4.3

Quote:

irmtfan wrote:
Cesag:
I dont know whether your issue with attachments is solved or not?


I will test your version as soon as I can, I'm very busy

182
irmtfan
Re: Newbb 4.3
  • 2012/8/12 1:48

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


deka87:
Do you have Altsys?
only Altsys can show us the template set resources.
go to Altsys -> templates -> newbb and take a screen shot for me
i could not replicate this error in my tests.
are you set both theme and template to default in the preferences?
then set the overright option to yes?
thank you for your contribution on solving this issue.

183
deka87
Re: Newbb 4.3
  • 2012/8/12 11:36

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


irtmfan,

OK, I have downloaded Altsys. Below is the screenshot. Everything is set to default and the overwrite option is set to Yes.

Resized Image

184
irmtfan
Re: Newbb 4.3
  • 2012/8/13 4:34

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


Thank you deka87.
you really consume your time to solve this issue.
first of all i should insist that xoops 2.5.5 failed to update templates in database.
As you can see the first 4 newbb block templates are not updated until now.
other templates are updated. I recommend you and everybody else to copy the templates from "base file" to the "DB-default" template set in database using Altsys. then you will be sure that all templates are correctly updated. Anyway, i have this issue in my xoops websites with news, newbb and some other modules.
IMO it is a xoops 2.5.5 bug that should be investigated more and then we can send it to the tracker for core team review.

Then it seems we should investigate more in xoops files.

could you show me the content of this filein you website:
xoops-2.5.5/htdocs/modules/system/preloads/core.php

i need to know if the eventCoreIncludeFunctionsRedirectheader function works correctly.
function eventCoreIncludeFunctionsRedirectheader($args)
    {
        global 
$xoopsConfig;
        
$url $args[0];
        if (
preg_match("/[\0-\31]|about:|script:/i"$url)) {
            if (!
preg_match('/^b(java)?script:([s]*)history.go(-[0-9]*)([s]*[;]*[s]*)$/si'$url)) {
                
$url XOOPS_URL;
            }
        }
        if (!
headers_sent() && isset($xoopsConfig['redirect_message_ajax']) && $xoopsConfig['redirect_message_ajax']) {
            
$_SESSION['redirect_message'] = $args[2];
            
header("Location: " preg_replace("/[&]amp;/i"'&'$url));
            exit();
        }
    }


then also please show me the content of this file in your website:
xoops-2.5.5/htdocs/include/functions.php

around line 563:
/**
 * Function to redirect a user to certain pages
 */
function redirect_header($url$time 3$message ''$addredirect true$allowExternalLink false)
{
    global 
$xoopsConfig$xoopsLogger$xoopsUserIsAdmin;

    
$xoopsPreload =& XoopsPreload::getInstance();
    
$xoopsPreload->triggerEvent('core.include.functions.redirectheader', array($url$time$message$addredirect$allowExternalLink));

    if (
preg_match("/[\0-\31]|about:|script:/i"$url)) {
        if (!
preg_match('/^b(java)?script:([s]*)history.go(-[0-9]*)([s]*[;]*[s]*)$/si'$url)) {
            
$url XOOPS_URL;
        }
    }
    if (!
$allowExternalLink && $pos strpos($url'://')) {
        
$xoopsLocation substr(XOOPS_URLstrpos(XOOPS_URL'://') + 3);
        if (
strcasecmp(substr($url$pos 3strlen($xoopsLocation)), $xoopsLocation)) {
            
$url XOOPS_URL;
        }
    }
    if (
defined('XOOPS_CPFUNC_LOADED')) {
        
$theme 'default';
    } else {
        
$theme $xoopsConfig['theme_set'];
    }

    require_once 
XOOPS_ROOT_PATH '/class/template.php';
    require_once 
XOOPS_ROOT_PATH '/class/theme.php';
    
$xoopsThemeFactory null;
    
$xoopsThemeFactory = new xos_opal_ThemeFactory();
    
$xoopsThemeFactory->allowedThemes $xoopsConfig['theme_set_allowed'];
    
$xoopsThemeFactory->defaultTheme $theme;
    
$xoTheme =& $xoopsThemeFactory->createInstance(array(
        
"plugins" => array(), "renderBanner" => false));
    
$xoopsTpl =& $xoTheme->template;
    
$xoopsTpl->assign(array(
        
'xoops_theme' => $theme ,
        
'xoops_imageurl' => XOOPS_THEME_URL '/' $theme '/' ,
        
'xoops_themecss' => xoops_getcss($theme) ,
        
'xoops_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES) ,
        
'xoops_sitename' => htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES) ,
        
'xoops_slogan' => htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES) ,
        
'xoops_dirname' => isset($xoopsModule) && is_object($xoopsModule) ? $xoopsModule->getVar('dirname') : 'system' ,
        
'xoops_pagetitle' => isset($xoopsModule) && is_object($xoopsModule) ? $xoopsModule->getVar('name') : htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES)));
    if (
$xoopsConfig['debug_mode'] == && $xoopsUserIsAdmin) {
        
$xoopsTpl->assign('time'300);
        
$xoopsTpl->assign('xoops_logdump'$xoopsLogger->dump());
    } else {
        
$xoopsTpl->assign('time'intval($time));
    }
    if (!empty(
$_SERVER['REQUEST_URI']) && $addredirect && strstr($url'user.php')) {
        if (!
strstr($url'?')) {
            
$url .= '?xoops_redirect=' urlencode($_SERVER['REQUEST_URI']);
        } else {
            
$url .= '&xoops_redirect=' urlencode($_SERVER['REQUEST_URI']);
        }
    }
    if (
defined('SID')&& SID && (!isset($_COOKIE[session_name()]) || ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '' && !isset($_COOKIE[$xoopsConfig['session_name']])))) {
        if (!
strstr($url'?')) {
            
$url .= '?' SID;
        } else {
            
$url .= '&' SID;
        }
    }
    
$url preg_replace("/&/i"'&'htmlspecialchars($urlENT_QUOTES));
    
$xoopsTpl->assign('url'$url);
    
$message trim($message) != '' $message _TAKINGBACK;
    
$xoopsTpl->assign('message'$message);
    
$xoopsTpl->assign('lang_ifnotreload'sprintf(_IFNOTRELOAD$url));

    
$xoopsTpl->display('db:system_redirect.html');
    exit();
}


Mamba: if you could find sometime and work on this issue in newbb it would be great.
IMO it is much more important than adding module admin class GUI to the old modules.
then we can have a newbb ready for release.

I hope Alfred continue this newbb module development because it needs some hardcodes removing by an expert.
some pages like print.php should be completly rewrite and also some permissions like "access to pdf creation" should be added.

185
deka87
Re: Newbb 4.3
  • 2012/8/13 6:58

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


irtmfan,

I have updated the templates via altsys but it didn't affect the redirection issue. anyways, plz download the requested files from here. hope we will solve the issue!

186
irmtfan
Re: Newbb 4.3
  • 2012/8/13 7:42

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


Maybe a session issue.
Could you try this?
- go to newbb preferences and set the "Enable Cache" option to No.
- go to admin -> system -> preferences -> General Settings -> Use custom session
to No

update the newbb module and let me know.


187
deka87
Re: Newbb 4.3
  • 2012/8/13 10:53

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


Both have been set to No so it's not the issue, irtmfan. I have talen a screenshot of debug when being redirected, guess it may be useful;

Resized Image

188
irmtfan
Re: Newbb 4.3
  • 2012/8/13 11:08

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


The fact that it is not worked only in reply and newtopic which is really strange to me.
please do the following:
- Empty xoops_session table and update the system module.
- remove !headers_sent() && from htdocs/modules/system/preloads/core.php
so it should be like this:
if (isset($xoopsConfig['redirect_message_ajax']) && $xoopsConfig['redirect_message_ajax']) {
            
$_SESSION['redirect_message'] = $args[2];
            
header("Location: " preg_replace("/[&]amp;/i"'&'$url));
            exit();
        }


this issue really exhaust me!


189
deka87
Re: Newbb 4.3
  • 2012/8/13 11:31

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


Cleaning the session table didn't help.

Quote:
!headers_sent() && from htdocs/modules/system/preloads/core.php


This caused a blankpage.

190
irmtfan
Re: Newbb 4.3
  • 2012/8/13 11:39

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


Quote:

This caused a blankpage.

very very good!
are you sure that you correctly remove that headers_sent()?
please copy/paste the whole file from here:
<?php
/**
 * System Preloads
 *
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright   The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license     GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @author          Cointin Maxime (AKA Kraven30)
 * @author          Andricq Nicolas (AKA MusS)
 * @version         $Id: core.php 8066 2011-11-06 05:09:33Z beckmi $
 */

defined('XOOPS_ROOT_PATH') or die('Restricted access');

class 
SystemCorePreload extends XoopsPreloadItem
{
    function 
eventCoreIncludeFunctionsRedirectheader($args)
    {
        global 
$xoopsConfig;
        
$url $args[0];
        if (
preg_match("/[\0-\31]|about:|script:/i"$url)) {
            if (!
preg_match('/^b(java)?script:([s]*)history.go(-[0-9]*)([s]*[;]*[s]*)$/si'$url)) {
                
$url XOOPS_URL;
            }
        }
        if (isset(
$xoopsConfig['redirect_message_ajax']) && $xoopsConfig['redirect_message_ajax']) {
            
$_SESSION['redirect_message'] = $args[2];
            
header("Location: " preg_replace("/[&]amp;/i"'&'$url));
            exit();
        }
    }

    function 
eventCoreHeaderCheckcache($args)
    {
        if (!empty(
$_SESSION['redirect_message'])) {
            
$GLOBALS['xoTheme']->contentCacheLifetime 0;
            unset(
$_SESSION['redirect_message']);
        }
    }

    function 
eventCoreHeaderAddmeta($args)
    {
        if (!empty(
$_SESSION['redirect_message'])) {
            
$GLOBALS['xoTheme']->addStylesheet('xoops.css');
            
$GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/jquery.js');
            
$GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/jquery.jgrowl.js');
            
$GLOBALS['xoTheme']->addScript('', array('type' => 'text/javascript'), '
            (function($){
                $(document).ready(function(){
                $.jGrowl("' 
$_SESSION['redirect_message'] . '", {  life:3000 , position: "center", speed: "slow" });
            });
            })(jQuery);
            '
);
        }
    }

    function 
eventSystemClassGuiHeader($args)
    {
        if (!empty(
$_SESSION['redirect_message'])) {
            
$GLOBALS['xoTheme']->addStylesheet('xoops.css');
            
$GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/jquery.js');
            
$GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/jquery.jgrowl.js');
            
$GLOBALS['xoTheme']->addScript('', array('type' => 'text/javascript'), '
            (function($){
            $(document).ready(function(){
                $.jGrowl("' 
$_SESSION['redirect_message'] . '", {  life:3000 , position: "center", speed: "slow" });
            });
            })(jQuery);
            '
);
            unset(
$_SESSION['redirect_message']);
        }
    }
}

?>

then we can be sure that you correctly remove that.

If you are sure about that now we have something to follow.
You should not have blank page in other xoops pages after submit.
It shows that you have an issue in the reply and newtopic and the header is already sent before this core function loaded.

I am tired now. I will think about your issue more today.

Login

Who's Online

219 user(s) are online (158 user(s) are browsing Support Forums)


Members: 0


Guests: 219


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits