Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: [Solved] Cannot add new pages  (Read 4156 times)

ad_267

  • Jr. Member
  • **
  • Karma: 7
  • Posts: 57
[Solved] Cannot add new pages
« on: August 25, 2007, 07:46:27 am »

Hi,

I'm trying out sNews 1.6 Multiple Users on my computer and have apache 2.0, php 5 and mySQL 5.0 installed on windows XP. I can add new categories and articles but I can't add new pages. When I try to add a new page I get a message "operation completed successfuly," but nothing has happened. No new page appears in the admin panel or in the list of pages and nothing has been added to the database.

Any help would be much appreciated thanks.
« Last Edit: August 27, 2007, 10:12:57 am by ad_267 »
Logged

Joost

  • Guest
Re: Cannot add new pages
« Reply #1 on: August 25, 2007, 08:05:39 am »

Welcome ad_267,

Applying fixes might solve the issue: Patches/fixes
Logged

ad_267

  • Jr. Member
  • **
  • Karma: 7
  • Posts: 57
Re: Cannot add new pages
« Reply #2 on: August 27, 2007, 01:02:09 am »

I've applied the fixes but it still doesn't work
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: Cannot add new pages
« Reply #3 on: August 27, 2007, 01:27:58 am »

This may sound simplistic... but if you have installed the default sNews package correctly... and your database is functioning properly... then you will be able to create categories and articles. Provided you have not tried editing or changing any code in the engine file... if you can create categories and articles then you will also be able to create pages. You do have the <?php pages() ?> function statement active within the index.php file... I hope.  ;)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

ad_267

  • Jr. Member
  • **
  • Karma: 7
  • Posts: 57
Re: Cannot add new pages
« Reply #4 on: August 27, 2007, 02:49:54 am »

Yes the pages function is called from index.php. I'm using the default sNews Multiple User package and hadn't changed anything until I applied the patches. It seems like it should work fine. It may be caused by running it on my own computer but I can't see why this should happen. I will try using the default sNews without the multiple user mod and see if that works.

Edit: I just installed a fresh install of sNews 1.6 and I can't add pages but I can add articles and categories
« Last Edit: August 27, 2007, 02:59:43 am by ad_267 »
Logged

piXelatedEmpire

  • MIA
  • ULTIMATE member
  • ******
  • Karma: 37
  • Posts: 1401
  • currently MIA
Re: Cannot add new pages
« Reply #5 on: August 27, 2007, 06:42:42 am »

Hmm... are you using something like Xampp or the like?  There must be an issue with your setup as this is not an issue with sNews itself.
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future

ad_267

  • Jr. Member
  • **
  • Karma: 7
  • Posts: 57
Re: Cannot add new pages
« Reply #6 on: August 27, 2007, 07:14:54 am »

I'm not using XAMPP. I've just installed Apache, MySQL and PHP using the installers from their sites. Yes it probably must be a problem with my setup but this seems really weird as I can add articles and categories, just not pages. The annoying thing is I don't have a proper host I can try sNews out on at the moment.
Logged

piXelatedEmpire

  • MIA
  • ULTIMATE member
  • ******
  • Karma: 37
  • Posts: 1401
  • currently MIA
Re: Cannot add new pages
« Reply #7 on: August 27, 2007, 08:03:31 am »

May I suggest you try a virtual server installation, like Xampp?  There is an easy to follow guide on how to setup sNews locally using Xampp.
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
Re: Cannot add new pages
« Reply #8 on: August 27, 2007, 08:41:31 am »

He can add articles and categories without problems using heavily modded package. Has default sNews package been tried out successfully? Like single user non-modded sNews?
Logged

Joost

  • Guest
Re: Cannot add new pages
« Reply #9 on: August 27, 2007, 08:58:25 am »

He can add articles and categories without problems using heavily modded package. Has default sNews package been tried out successfully? Like single user non-modded sNews?
He did.
Logged

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
Re: Cannot add new pages
« Reply #10 on: August 27, 2007, 09:06:40 am »

Ohhh ... I see ... default version works just fine, modded version doesn't ... natural solution - reinstall environment :o
Logged

ad_267

  • Jr. Member
  • **
  • Karma: 7
  • Posts: 57
Re: Cannot add new pages
« Reply #11 on: August 27, 2007, 09:35:38 am »

No, neither the default version or the modded version work. It must be something wrong with my setup. The mysql_query("INSERT INTO  . . . command is being run when I try to create a page but it isn't doing anything for some reason.
Logged

ad_267

  • Jr. Member
  • **
  • Karma: 7
  • Posts: 57
Re: Cannot add new pages
« Reply #12 on: August 27, 2007, 09:43:48 am »

I've found that the error I'm getting when I try to add a page is:

Incorrect integer value: '' for column 'category' at row 1

The category variable is empty.

So if I add some code that says if position = 3 then category = 0 would that fix this? Or if I changed the article table in the database so that category can be null?
« Last Edit: August 27, 2007, 09:52:03 am by ad_267 »
Logged

Joost

  • Guest
Re: Cannot add new pages
« Reply #13 on: August 27, 2007, 09:50:25 am »

Pages are set to '0'. So this mysql cannot handle '0' or thinks it is NULL.

Update: Sorry crossposted. Came to the same conclusion. But the solution? I don't know
« Last Edit: August 27, 2007, 09:58:00 am by Joost »
Logged

ad_267

  • Jr. Member
  • **
  • Karma: 7
  • Posts: 57
Re: Cannot add new pages
« Reply #14 on: August 27, 2007, 10:06:38 am »

I've got it working!

I added:
if ($contents == 'page_new' || $edit_option == 3) {
   echo '<input type="hidden" name="define_category" id="category" value="0" />';
   }

under "// ARTICLES FORM" just before the submit button.

For some reason the category value was NULL, not 0 when I was trying to add a page. Very weird.

Thank you for everyones help  :)
« Last Edit: August 27, 2007, 10:45:06 am by ad_267 »
Logged
Pages: [1] 2