1
feppa
Login problem and submit news problem
  • 2005/1/17 16:55

  • feppa

  • Just popping in

  • Posts: 2

  • Since: 2005/1/17


I've gotten problem to login using the block. It has been working but sudden it diden't. I have set up the site twice and after a while this happens. Att the same time this happens it's imposseble to submit news from the user interface. From the admin section it works. Any idea what my problem could be?


(sorry for may bad english)

2
Cavan
Re: Login problem and submit news problem
  • 2005/1/22 7:53

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


I'm having the same problem with the 'submit news' feature in the user menu. I can preview a post but when clicking the 'post' button, the next page displays the 'thank you for your submission...' message and the word 'error' in the top left of the page and the post isn't submitted.

My webhost has been working on finding out what's causing this (I've yet to find the answer here) and today they managed to submit a test news post, but when I tried it again, the same error message came up. This is seriously frustrating because having the ability to submit news/events is a XOOPS feature that my users definitely need.

It isn't a caching issue---I've cleared the cache multiple times. It doesn't appear to be a corrupted file issue---I've uploaded two separate backup modules/news/submit.php files and the error still persists. I've checked the mainfile.php for trailing backslashes and don't see anything wrong there, either.

As with other current problems I'm having, this didn't begin happening until I dumped my templates_c folder a week ago, and all hell has broken loose since (the first and last time I clear this folder). I've even gone as far as uploading backups of the templates_c folder and even that's made no difference.

I need seriously help on this. Anyone have any thoughts on why this is happening?

3
Peekay
Re: Login problem and submit news problem
  • 2005/1/22 11:57

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


May not be the cause, but has your host recently upgraded to MySQL 4.1? I use another CMS where this has caused endless login and session problems due to the difference in the way 4.1 handles the timestamp. The only solution was a file patch from the developers.

4
hervet
Re: Login problem and submit news problem
  • 2005/1/22 12:07

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


could you specify your XOOPS version and the news module's version ?

5
Cavan
Re: Login problem and submit news problem
  • 2005/1/22 17:33

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


Peekay:

Operating system: Linux
Kernel version: 2.4.28
Machine Type: i686
Apache version: 1.3.33 (Unix)
PERL version: 5.8.4
PHP version: 4.3.10
MySQL version: 4.0.22 (standard-log)

No upgrades in recent months...I don't see a MySQL issue here at all (I did look into that). I've also already run both MySQL/Blocks Debug and Smarty Templates Debug and the site generated no errors using either one.

Hervet:

Xoops: 2.0.7.3
News Module: 1.1

I have no intentions of upgrading to the latest XOOPS release---unless there's a specific change in this module that makes upgrading necessary, I'm leaving my site as is until I can fix the problems caused by dumping the templates_c folder.

I did receive a response from my webhost concerning the PHP Debug errors generated on my site:

Notice [PHP]: Undefined index: anonpost in file modules/news/include/storyform.inc.php line 39 (at the .../modules/news/submit.php page)

Notice [PHP]: Undefined index: cid in file modules/myalbum/include/functions.php line 713
Notice [PHP]: Undefined index: cid in file modules/myalbum/include/functions.php line 714
Notice [PHP]: Undefined index: title in file modules/myalbum/include/functions.php line 714
Notice [PHP]: Undefined index: num in file modules/myalbum/include/functions.php line 714 (all at the ...modules/myalbum page---MyAlbum vers. 2.7)

Notice [PHP]: Constant _LIST already defined in file modules/buddyfriends/language/english/main.php line 17
Notice [PHP]: Constant _REPLY already defined in file modules/buddyfriends/language/english/main.php line 24
Notice [PHP]: Constant _NOTITLE already defined in file modules/buddyfriends/language/english/main.php line 59
Notice [PHP]: Undefined variable: email in file modules/buddyfriends/index.php line 40 (all at the ...modules/buddyfriends/index.php page)

NOT ONE of these errors occurred BEFORE dumping the templates_c folder---I know they didn't because I'd run all three debugs previous to dumping the folder.

Curiously enough, the email response from my host stated that they cannot generate the same errors from their end, so WHY or HOW does this happen when I do this, even while running the debugs under the same login?

I even have an erasing utility on my pc, so I doubt it's anything browser- or cache-related because I've run the erasing utility to completely wipe any temporary files generated by my browser (Internet Explorer 6) and when attempting to submit a news post again, the same error appears.

This is beginning to look more and more like a bug with Xoops; or, is it indeed a sessions issue concerning the problem with the News module? I have't a clue as to why the other errors occur and can't fix them either.

I'm not looking forward to starting over if I can't get these issues resolved...is that what I'm heading for?

6
Cavan
Re: Login problem and submit news problem
  • 2005/1/24 13:45

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


I'm still getting the following error when trying to submit news:

Notice [PHP]: Undefined index: anonpost in file modules/news/include/storyform.inc.php line 39

In the news module general configuration, I have both "Allow anonymous users to post news articles?" and "Allow anonymous post in comments?" set to NO, and "Auto approve news stories without admin intervention?" set to YES.

In the modules/news/include/storyform.inc.php, if I comment out the following lines (where the // appears in the code), the error goes away:

if ($xoopsUser) //{
//if ($xoopsConfig['anonpost'] == 1) {
//$noname_checkbox = new XoopsFormCheckBox('', 'noname', $noname);
//$noname_checkbox->addOption(1, _POSTANON);
//$option_tray->addElement($noname_checkbox);
//}
$notify_checkbox = new XoopsFormCheckBox('', 'notifypub', $notifypub);
$notify_checkbox->addOption(1, _NW_NOTIFYPUBLISH);
$option_tray->addElement($notify_checkbox);
if ($xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
$nohtml_checkbox = new XoopsFormCheckBox('', 'nohtml', $nohtml);
$nohtml_checkbox->addOption(1, _DISABLEHTML);
$option_tray->addElement($nohtml_checkbox);
}
//}

...But, this has no effect on the error that appears when trying to submit news.

I've even tried uninstalling and deleting (from my site directory) the News 1.16 module (included with XOOPS 2.0.7.3), and replacing it with the News 1.17 module (included with XOOPS 2.0.9.2) but even doing this had no effect...the error still appears and I cannot submit news.
In addition, upgrading from 1.16 to 1.17 had no effect on the above PHP error showing---even that still shows when running PHP Debug.

What is going on here? Is there another version of the News module available and will it fix the problems here? I need help with this ASAP. Can someone help me figure this out?

Edit: I just installed the News 2 module and have the same problems...

7
Cavan
Re: Login problem and submit news problem
  • 2005/1/24 19:28

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


If someone can have a look at this modules/news2/submit.php (which seems to be where the error is generated), please let me know if you find something wrong (I don't see anything):

<?php
// $Id: submit.php,v 1.1 2004/01/29 14:45:49 buennagel Exp $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <https://xoops.org/>                             //
//  ------------------------------------------------------------------------ //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  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.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
include '../../mainfile.php';
include_once 
'class/class.newsstory.php';
if (empty(
$xoopsModuleConfig['anonpost']) && !is_object($xoopsUser)) {
    
redirect_header("index.php"0_NOPERM);
    exit();
}
$op 'form';
foreach ( 
$HTTP_POST_VARS as $k => $v ) {
    ${
$k} = $v;
}
if ( isset(
$HTTP_POST_VARS['preview'] )) {
    
$op 'preview';
} elseif ( isset(
$HTTP_POST_VARS['post']) ) {
    
$op 'post';
}
switch (
$op) {
case 
"preview":
    
$myts =& MyTextSanitizer::getInstance(); // MyTextSanitizer object
    
$xt = new XoopsTopic($xoopsDB->prefix("topics2"), $HTTP_POST_VARS['topic_id']);
    include  
XOOPS_ROOT_PATH.'/header.php';
    
$p_subject $myts->makeTboxData4Preview($subject);
    if (
$xoopsUser && $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
        
$nohtml = isset($nohtml) ? intval($nohtml) : 0;
    } else {
        
$nohtml 1;
    }
    
$html = empty($nohtml) ? 0;
    if ( isset(
$nosmiley) && intval($nosmiley) > ) {
        
$nosmiley 1;
        
$smiley 0;
    } else {
        
$nosmiley 0;
        
$smiley 1;
    }
    
$p_message $myts->makeTareaData4Preview($message$html$smiley1);
    
$subject $myts->makeTboxData4PreviewInForm($subject);
      
$message $myts->makeTareaData4PreviewInForm($message);
    
$noname = isset($noname) ? intval($noname) : 0;
    
$notifypub = isset($notifypub) ? intval($notifypub) : 0;
    
$p_message = ($xt->topic_imgurl() != '') ? '<img src="images/topics/'.$xt->topic_imgurl().'" align="right" alt="" />'.$p_message $p_message;
    
themecenterposts($p_subject$p_message);
    include 
'include/storyform.inc.php';
    include 
XOOPS_ROOT_PATH.'/footer.php';
    break;
case 
"post":
    
$nohtml_db 1;
    if ( 
$xoopsUser ) {
        
$uid $xoopsUser->getVar('uid');
        if ( 
$xoopsUser->isAdmin($xoopsModule->mid()) ) {
            
$nohtml_db = empty($nohtml) ? 1;
        }
    } else {
        if ( 
$xoopsModuleConfig['anonpost'] == ) {
            
$uid 0;
        } else {
            
redirect_header("index.php",3,_NOPERM);
            exit();
        }
    }
    
$story = new NewsStory();
    
$story->setTitle($subject);
    
$story->setHometext($message);
    
$story->setUid($uid);
    
$story->setTopicId($topic_id);
    
$story->setHostname(xoops_getenv('REMOTE_ADDR'));
    
$story->setNohtml($nohtml_db);
    
$nosmiley = isset($nosmiley) ? intval($nosmiley) : 0;
    
$notifypub = isset($notifypub) ? intval($notifypub) : 0;
    
$story->setNosmiley($nosmiley);
    
$story->setNotifyPub($notifypub);
    
$story->setType('user');
    if ( 
$xoopsModuleConfig['autoapprove'] == ) {
        
$approve 1;
        
$story->setApproved($approve);
        
$story->setPublished(time());
        
$story->setExpired(0);
        
$story->setTopicalign('R');
    }
    
$result $story->store();
    if (
$result) {
        
// Notification
        
$notification_handler =& xoops_gethandler('notification');
        
$tags = array();
        
$tags['STORY_NAME'] = $subject;
        
$tags['STORY_URL'] = XOOPS_URL '/modules/' $xoopsModule->getVar('dirname') . '/article.php?storyid=' $story->storyid();
        if ( 
$xoopsModuleConfig['autoapprove'] == 1) {
            
$notification_handler->triggerEvent('global'0'new_story'$tags);
        } else {
            
$tags['WAITINGSTORIES_URL'] = XOOPS_URL '/modules/' $xoopsModule->getVar('dirname') . '/admin/index.php?op=newarticle';
            
$notification_handler->triggerEvent('global'0'story_submit'$tags);
        }
        
// If notify checkbox is set, add subscription for approve
        
if ($notifypub) {
            include_once 
XOOPS_ROOT_PATH '/include/notification_constants.php';
            
$notification_handler->subscribe('story'$story->storyid(), 'approve'XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
        }
    
/*
        if ($xoopsModuleConfig['notifysubmit'] == 1 ) {
            $xoopsMailer =& getMailer();
            $xoopsMailer->useMail();
            $xoopsMailer->setToEmails($xoopsConfig['adminmail']);
            $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
            $xoopsMailer->setFromName($xoopsConfig['sitename']);
            $xoopsMailer->setSubject(_NW2_NOTIFYSBJCT);
            $body = _NW2_NOTIFYMSG;
            $body .= "nn"._NW2_TITLE.": ".$story->title();
            $body .= "n"._POSTEDBY.": ".XoopsUser::getUnameFromId($uid);
            $body .= "n"._DATE.": ".formatTimestamp(time(), 'm', $xoopsConfig['default_TZ']);
            $body .= "nn".XOOPS_URL.'/modules/news2/admin/index.php?op=edit&storyid='.$result;
            $xoopsMailer->setBody($body);
            $xoopsMailer->send();
        }
    */
    
} else {
        echo 
'error';
    }
    
redirect_header("index.php",2,_NW2_THANKS);
    break;
case 
'form':
default:
    
$xt = new XoopsTopic($xoopsDB->prefix("topics2"));
    include 
XOOPS_ROOT_PATH.'/header.php';
    
$subject '';
    
$message '';
    
$noname 0;
    
$nohtml 0;
    
$nosmiley 0;
    
$notifypub 1;
    include 
'include/storyform.inc.php';
    include 
XOOPS_ROOT_PATH.'/footer.php';
    break;
}
?>


Thank you.

8
m0nty
Re: Login problem and submit news problem
  • 2005/1/26 2:28

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


i'm just checking here as

Quote:

If someone can have a look at this modules/news2/submit.php (which seems to be where the error is generated), please let me know if you find something wrong (I don't see anything):


modules/news2 ???

is that a typo or is the news module ur using called news2? as thats an old clone.. and not the same as news..

9
Cavan
Re: Login problem and submit news problem
  • 2005/1/26 2:31

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


Its News2...doesn't seem to matter which one I use---ALL of them generate this error.

10
m0nty
Re: Login problem and submit news problem
  • 2005/1/26 2:40

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


have u tried news 1.2.1 available from the dev site?

http://dev.xoops.org/modules/xfmod/project/showfiles.php?group_id=1008&release_id=60&dl=273

its the module that this site (xoops.org) uses for news.

also u maybe confusing the version numbers..

the v 1.16 & 1.17 aren't the actual module version..

they're just cvs revision numbers for when multiple developers are submitting files, so that they don't overwrite each others modifications..

the correct version number you will find if u open xoops_version.php and look where it says version =

if ur swapping them from 2.0.9.2 and 2.0.7.3 i'd suggest u copy all the files instead of just the 1 u have a problem with..

Login

Who's Online

258 user(s) are online (142 user(s) are browsing Support Forums)


Members: 0


Guests: 258


more...

Donat-O-Meter

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

Latest GitHub Commits