61
brash
Re: AMS 2.2 *again*
  • 2005/3/6 23:55

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Hi Cavan,

Sorry I keep getting side tracked with this one , I have now set this site to notify me of any new posts in this thread.

Good to hear you've made some progress.

The "article saving failed" error comes about from a failed SQL statement which are located at lines 417 and 435 of class.newsstory.php. This means that the error *should* display itself if you turn on MySQL debug in your XOOPS preferences area. If you can turn on MySQL debug and then post the results from the MySQL debug window after you try submitting an article we should hopefully get some more insight.

I did a diff on your submit.php and it is exactly the same as the submit.php included with AMS 2.2. As I eluded to above, I think we will find that this is not a direct problem with AMS, but rather something to do with your environment that Xoops/AMS is not compatible with. Logic would suggest that if it was a problem (as in a bug) with AMS then there would be a lot of people reporting the same issue, which is not the case from what I have observed. Doesn't mean I don't want to get to the bottom of it though .

The [extend] tag is the tag AMS uses to seperate the article introduction from the main body of an article. All text prior to the [extend] tag is treated as the article introduction, and all text after it is treated as the main body of the article. For example;
Quote:

This is the article introduction text which gives a brief outline of the article to entise the end user into reading the full article.
[extend]
This is the main body of the article which is only displayed when a user actually selects the article from the any of the AMS blocks, or index and topic views.

The fact that it is showing up when doing a preview is perfectly fine for AMS 2.2.

It might also be benefitial if you could turn on your PHP debuging options from within PHP itself. To do this set these values;

error_reporting = E_ALL

log_errors = On

error_log = path/to/file

This should hopefully also gives us some more information. I also wouldn't mind seeing what you exact PHP environment is. Could you place the following in a file with a .php extension;

Quote:

<?php

phpinfo();

?>


Doesn't matter what you call it, as long as it has a .php extension. Once you've done this could you PM me the URL so I can take a look.

62
Cavan
Re: AMS 2.2 *again*
  • 2005/3/7 13:02

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


Quote:

brash wrote:

The "article saving failed"...error *should* display itself if you turn on MySQL debug in your XOOPS preferences area.


This occurs without having MySQL debug turned ON in the preferences menu.

Quote:

The [extend] tag...showing up when doing a preview is perfectly fine for AMS 2.2.


This issue began after the environment changes you suggested were made.


Quote:
...turn on your PHP debuging options from within PHP itself. To do this set these values;

error_reporting = E_ALL

log_errors = On

error_log = path/to/file


I'm not sure how to do this since my site isn't hosted locally. Please let me know what to do here.

I've already posted my phpinfo.php, but that was prior to some of the environment changes. I'll PM a current phpinfo to you. The previous phpinfo results can be seen here. Thank you.

63
brash
Re: AMS 2.2 *again*
  • 2005/3/8 1:42

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Quote:

Cavan wrote:
This occurs without having MySQL debug turned ON in the preferences menu.


Sorry, I shouldh've been clearer. The "article not saved" error is obviously not that helpful in terms of fault finding. What I am hoping is that we will be able to get an idea of exactly what is failing, and where by using the XOOPS MySQL debug option.

Quote:

This issue began after the environment changes you suggested were made.


Not sure what might have caused this not to show up prior, but obviously it was a PHP environment issue.

Quote:

I'm not sure how to do this since my site isn't hosted locally. Please let me know what to do here.


I'm not an Apache man (I use IIS), but as far as I understand you should be able to set these options with your htaccess files.

Quote:

I've already posted my phpinfo.php, but that was prior to some of the environment changes. I'll PM a current phpinfo to you. The previous phpinfo results can be seen here. Thank you.


I've had a look at your PHP environment, and I'm struggling to see what might be causing it. The remaining issue might well lie outside your PHP config. I also just found out that if any sort of HTTP refferer blocking will also cause this type of behaviur, so it might be worth checking with your host to see if that is happening as well.

64
Cavan
Re: AMS 2.2 *again*
  • 2005/3/12 13:55

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


I turned on MySQL Debug but don't see any errors among the queries on any page. However, there is this error (when using PHP Debug) after clicking on the "preview" button when attempting to post a news item:

Warning [PHP]: array_push(): First argument should be an array in file class/module.textsanitizer.php line 113

The item will still post, even with this error being generated. I'm not sure what this means since I'm totally unfamiliar with the use of "textsanitizer" in XOOPS (or anywhere else for that matter). I don't understand why this error is generated when previewing a post (a post that isn't even using smilies). Below are lines 99-122 in my class/module.textsanitizer.php:

/**
     * Replace emoticons in the message with smiley images
     *
     * @param    string  $message
     *
     * @return    string
     */
    
function &smiley($message)
    {
        
$db =& Database::getInstance();
        if (empty(
$this->smileys)) {
            if (
$getsmiles $db->query("SELECT * FROM ".$db->prefix("smiles"))){
                while (
$smiles $db->fetchArray($getsmiles)) {
                    
$message =& str_replace($smiles['code'], '<img src="'.XOOPS_UPLOAD_URL.'/'.htmlspecialchars($smiles['smile_url']).'" alt="" />'$message);
                    
array_push($this->smileys$smiles);
                }
            }
        } else {
            foreach (
$this->smileys as $smile) {
                
$message =& str_replace($smile['code'], '<img src="'.XOOPS_UPLOAD_URL.'/'.htmlspecialchars($smile['smile_url']).'" alt="" />'$message);
            }
        }
        return 
$message;
    }


FYI, "array_push($this->smileys, $smiles);" is line 113 in my module.textsanitizer.php file.

Is this what's causing the problem with the news module[s]?

65
Cavan
Re: AMS 2.2 *again*
  • 2005/3/13 6:10

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


Getting somewhere...?

Okay, I deactivated and uninstalled AMS 2.2 and installed Stories 0.92, just to see if this module would work since I was having no luck with every other news module out there.
Guess what? It works, to an extent: I'm able to post with or without previewing the article, but yet another text sanitizer issue comes up with PHP Debug on:

...from modules/stories/index.php: (just visiting the page)

Warning [PHP]: Problem with method call - please report this bug in file modules/stories/class/class.newsstory.php line 138
Notice [PHP]: Undefined index: allowed_html in file modules/stories/class/stories_textsanitizer.php line 164
Notice [PHP]: Undefined index: allowed_html in file modules/stories/class/stories_textsanitizer.php line 164
Notice [PHP]: Undefined index: allowed_html in file modules/stories/class/stories_textsanitizer.php line 164
Notice [PHP]: Undefined index: allowed_html in file modules/stories/class/stories_textsanitizer.php line 164

...from modules/stores/submit.php: (no posting, just visiting the page)

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

...from modules/stores/submit.php: (previewing the post but not submitting yet)

Notice [PHP]: Undefined index: allowed_html in file modules/stories/class/stories_textsanitizer.php line 188
Notice [PHP]: Undefined index: anonpost in file modules/stories/include/storyform.inc.php line 41

So, is there a definite issue with the module.textsanitizer.php on my site, or is it an environment problem? The problem exists with Stories 0.92 and AMS 2.2, so what's going on here? I'm stumped on this since I know nothing on the use of the "text sanitizer" (though I have a vague idea, that's all it is...a vague idea), or what it's purpose is in Xoops. Anyone?

66
brash
Re: AMS 2.2 *again*
  • 2005/3/15 5:48

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Hi Cavan,

If you like, you can set up a test site on my server. Just to try and iron things out so you can see how things are meant to work. Perhaps that will give us an angle on why this problem is happening.

67
Cavan
Re: AMS 2.2 *again*
  • 2005/3/15 16:07

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


brash,

Let me know what you need me to do...Thanks.

68
brash
Re: AMS 2.2 *again*
  • 2005/3/17 23:12

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


in the middle of changing ISP Cavan, so I once I have that off my plate I can give this some more attention. What I will need is basically a copy of your database and XOOPS website so I can put them on my server and setup the site. You'd need to make a new DNS record to point to my server (something like beta.yourdomain.com ) . Before we do anything though can you check that your DNS hosting provider supports dynamic DNS?

69
Cavan
Re: AMS 2.2 *again*
  • 2005/3/18 18:53

  • Cavan

  • Friend of XOOPS

  • Posts: 218

  • Since: 2004/11/28


Waiting on a RSVP from my host...I've downloaded a full backup of my site and have it available in a Zip. Let me know if this is acceptable. Thank you.

70
brash
Re: AMS 2.2 *again*
  • 2005/3/21 3:31

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Hi Cavan,

That should be fine. Feel free to PM me with download details for your XOOPS and database backups .

Login

Who's Online

228 user(s) are online (171 user(s) are browsing Support Forums)


Members: 0


Guests: 228


more...

Donat-O-Meter

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

Latest GitHub Commits