Help! Moved categories around and everything has gone :S

Bug reports on core system for v1.2 STABLE only.

Help! Moved categories around and everything has gone :S

Postby HairyFish » Fri Mar 09, 2012 5:41 pm

Hello there campers,

I've made a cock-up somewhere. In the admin control panel > content > published content, there are numerous categories, like "top-navigaton", "sidebar", "footer" etc, well I reordered them by dragging the categories themselves. So say top-navigation is at the top, I drag footer to the top instead.

There didn't appear to be any glitches...until...

I checked the page "view site" green icon top right.

Calamities! My page has gone. No content (white page with text etc) and no side bar. I still get the default black bar at the top of the page, blue gradient fill background and page title. Also, I have in the page top-navigation bar only two sections - neither load anything different to the blue gradient, black header bar and top nav bar.

I am using a self modified default theme, basically just wider (I adjusted the default.css file in root/themes/ - width 950px -> 1200px and other adjusted accordingly). This was working perfectly fine before I moved those categories around - so it's not edited .css that's at fault, I think.
I moved the categories in the demo, and there was no issue at all.

here's a screen grab of the site in all it's gone-wrong-ness.

Image

No page content / No side bar / only two categories in top nav. bar.


Anyone have a clue what's gone wrong here?
I think my level of coding ceased when we stopped using cassettes to load our software. RIP Commodore C64.
HairyFish
 
Posts: 10
Joined: Mon Feb 13, 2012 5:53 pm

Re: Help! Moved categories around and everything has gone :S

Postby Adminer » Fri Mar 09, 2012 7:58 pm

Hi!

F5 button or Shift + F5 works? Any change?
You shouldn't have any problems like this - if you don't change your category names. Check - is your sidebar category as a sidebar, and footer as a footer?
If you are sure - ZIP your full folder with this instalation and send it by an e-mail on: razorcms @ nospam. gazeta . pl (remove nospam. and all spaces).

Regards
Adminer
 
Posts: 578
Joined: Wed Apr 08, 2009 9:52 pm
Location: Poland

Re: Help! Moved categories around and everything has gone :S

Postby HairyFish » Fri Mar 09, 2012 11:38 pm

Sent you an email, with a .zip dump of the entire root folder.

Hopefully something will make sense. Nothing stuck out as obvious to me (naturally it wouldn't, I have my kiddy arm-bands on when it comes to this kinda stuff), so I didn't fiddle.

Good luck,

Thanks
I think my level of coding ceased when we stopped using cassettes to load our software. RIP Commodore C64.
HairyFish
 
Posts: 10
Joined: Mon Feb 13, 2012 5:53 pm

Re: Help! Moved categories around and everything has gone :S

Postby Adminer » Sat Mar 10, 2012 10:17 am

Hi!
Thank you for your e-mail. It's very interesting: message from this bug is:

Fatal error: Maximum function nesting level of '100' reached, aborting! in D:\UwAmp\www\r121\core\public_func.php on line 794
Call Stack
# Time Memory Function Location
1 0.0005 353376 {main}( ) ..\index.php:0
2 0.0053 715432 include_once( 'D:\UwAmp\www\r121\theme\default_xhtml.php' ) ..\index.php:130
3 0.0054 715488 loadLinks( ) ..\default_xhtml.php:27
4 0.0059 716552 slabUrl( ) ..\public_func.php:482
5 0.0059 716864 getSubCats( ) ..\public_func.php:608
6 0.0060 717024 getSubCats( ) ..\public_func.php:799
7 0.0060 717480 getSubCats( ) ..\public_func.php:799
8 0.0060 717936 getSubCats( ) ..\public_func.php:799
9 0.0060 718392 getSubCats( ) ..\public_func.php:799
10 0.0060 718848 getSubCats( ) ..\public_func.php:799
11 0.0061 719304 getSubCats( ) ..\public_func.php:799
...
100....

So, this function with the problem:
Code: Select all
   // recursive tool for getting sub cats //
   function getSubCats($slabId){
      global $razorArray;
      $output = '';
      foreach($razorArray['sub_cat_flag'] as $subcat=>$alPage){
         if(is_array($razorArray['links_cats'][$subcat])){
            if(in_array($slabId,$razorArray['links_cats'][$subcat])){
               // page is in sub cat //
               $output.= '/'.$subcat;
               // get allocated page id and check if that in sub cat //
               $recOutput = getSubCats(array_search($alPage,$razorArray['slabs']));
               if($recOutput != ''){
                  $output = $recOutput.$output;
               }
            }
         }
      }
      return $output;
   }


So, we will see...

Regards
Adminer
 
Posts: 578
Joined: Wed Apr 08, 2009 9:52 pm
Location: Poland

Re: Help! Moved categories around and everything has gone :S

Postby HairyFish » Sat Mar 10, 2012 10:56 am

Ah good you got everything you needed to look into it - that's a relief. The backup didn't look to contain anywhere enough stuff to diagnose the problem.

Looks like you've narrowed it down...

Any clue how to fix that?

Thanks for looking into this,

Cheers!
I think my level of coding ceased when we stopped using cassettes to load our software. RIP Commodore C64.
HairyFish
 
Posts: 10
Joined: Mon Feb 13, 2012 5:53 pm

Re: Help! Moved categories around and everything has gone :S

Postby Adminer » Sat Mar 10, 2012 11:06 am

Hi!

If you can do that naturaly - it's a strange bug in razorCMS 1.2.1
There is a database file: datastore\razor_data.txt
In this file, in the end we have now information in our database:
a:3:{s:7:"reviews";s:7:"reviews";s:5:"files";s:5:"files";s:16:"music-discussion";s:16:"music-discussion";}}
and this may be a problem there.

If I change this on:
a:1:{s:7:"reviews";s:7:"reviews";}}
everything come back and razorCMS works.

I will send you by e-mail working good database file razor_data.txt - but Paul must have time to see, what happened.

Regards
Adminer
 
Posts: 578
Joined: Wed Apr 08, 2009 9:52 pm
Location: Poland

Re: Help! Moved categories around and everything has gone :S

Postby HairyFish » Sat Mar 10, 2012 2:06 pm

Genius!
That fixed it. Looks good.

Thank you so much.

I copied out the old razor_data.txt so I could load it straight back in, so Paul can see the malfunctioning site.
I'll leave the site active, and unedited until tomorrow morning, so there's chance to see it in all it's malfunctioning glory! :)

Thanks again for your help!
I think my level of coding ceased when we stopped using cassettes to load our software. RIP Commodore C64.
HairyFish
 
Posts: 10
Joined: Mon Feb 13, 2012 5:53 pm

Re: Help! Moved categories around and everything has gone :S

Postby smiffy6969 » Sun Mar 11, 2012 6:59 pm

Wooo, thats totally bizarre....

Glad it's fixed.

I'll take a look.

ta

smiffy
smiffy6969
 
Posts: 1866
Joined: Sat May 24, 2008 8:18 am
Location: Loughborough, UK

Re: Help! Moved categories around and everything has gone :S

Postby smiffy6969 » Sun Mar 11, 2012 8:21 pm

Hi,

This is not a problem with moving around the categories, it's a co-incidence, you didn't refresh your page enough whilst making changes and didn't catch the silly mistake you made just before moving the categories around.

Found the issue, you have added a page to it's own sub category, result is a never ending loop, trying to add it's sub pages, then seeing if they have any sub categories, which they do, itself, and so on.

Basically you created a page, then assigned a sub category to it, then you added the original page into it's own sub category....... Silly mistake, but genuine bug by letting you do it in the first place.

Simple answer is you should not be able to add a page to it's own sub category, it doesn't make sense any way, but then things should fail gracefully and stop you from doing this.

I will be releasing a new version soon, with a security bug fix in, I will add this fix to that release. I am not going to release a fix for now, as it is a bug that comes about from doing something a bit silly (your mum cant be your daughter too ;) ) so for now, remove the 'more discussions' page from the more-discussions category, because it's assigned to the more discussions page :D . This will stop your problem. Sort of reminds me of those time paradox's, if I go back in time to warn myself not to do something....... but how did I come from the future in the first place, because I would have had to have warned myself before I could get there.... :shock:

ta

smiffy
smiffy6969
 
Posts: 1866
Joined: Sat May 24, 2008 8:18 am
Location: Loughborough, UK


Return to Bugs - Core V1.2 STABLE [DEPRECATED]

Who is online

Users browsing this forum: No registered users and 1 guest