HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Galleries got fubared, how to recreate root?

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#18947 (In Topic #4402)
SMC
Avatar

Fan in training

I created a gallery called personal galleries under the root gallery and it created three copies of the gallery each with a sub gallery for each member.

Ok. Strange. I thought maybe I accidentally hit submit three times or something.

So I deleted one of them. It ended up deleting two of them and anything I tried to do with the one that was left gave me a resource does not exist error.

So I thought ok, well maybe if I delete and recreate the root gallery it will reset things.

I guess that wasnt intended as a solution because after I deleted the root now when I try to add gallery I get a stack dump problem.

Any ideas on how to recreate root manually?  

Thanks in advance.

– David Schwanke (SMC)

NOTICE [8] Undefined offset: 0

Below is a stack-trace revealing the state ocPortal was in when the error occured. If this represents a bug in ocPortal's unmodified software, you may want to check ocportal.com for a fix, and if there isn't one, report this as a bug. Please note that merely posting a stack trace is not sufficient for us to solve your problem; the stack trace is just an aid that presents us with additional information. We still need to know the error message, the human situation, version numbers, and any other appropriate information.
We apologise for this problem and hope you will work with us so that we can fix it promptly.

File  '/home/gemsotd/public_html/sources/global2.php'  
Line  '394'  
Function  'get_html_trace'  

File  '/home/gemsotd/public_html/sources/galleries.php'  
Line  '1,207'  
Function  'ocportal_error_handler'  

File  '/home/gemsotd/public_html/sources/galleries.php'  
Line  '1,207'  
Function  'get_gallery_tree'  

File  '/home/gemsotd/public_html/sources/galleries.php'  
Line  '1,169'  
Function  'get_gallery_tree'  

File  '/home/gemsotd/public_html/admincentre/pages/modules/admin_
galleries.php'  
Line  '110'  
Function  'nice_get_gallery_tree'  

File  '/home/gemsotd/public_html/admincentre/pages/modules/admin_
galleries.php'  
Line  '152'  
Function  'get_gallery_fields'  
Class  'Module_admin_galleries'  
Type  '->'  

File  '/home/gemsotd/public_html/admincentre/pages/modules/admin_
galleries.php'  
Line  '70'  
Function  'ac'  
Class  'Module_admin_galleries'  
Type  '->'  

File  '/home/gemsotd/public_html/sources/zones.php'  
Line  '276'  
Function  'run'  
Class  'Module_admin_galleries'  
Type  '->'  

File  '/home/gemsotd/public_html/sources/site.php'  
Line  '476'  
Function  'load_module_page'  

File  '/home/gemsotd/public_html/sources/site.php'  
Line  '300'  
Function  'request_page'  

File  '/home/gemsotd/public_html/admincentre/index.php'  
Line  '42'  
Function  'do_site'  
Back to the top
 
Posted
Rating:
#18949
Avatar

I think you probably did hit submit three times - but I'm glad you've reported this deletion problem, because I've seen a few automated error e-mails about it but nobody has reported how it came to be until now. ocPortal should definitely not let you delete the root gallery!

To fix it, temporarily edit the data_custom/execute_temp.php to put the following lines of code in the 'execute_temp' function…

Code

   require_code('galleries');
   add_gallery('root',do_lang('ROOT'),'','','','',0,0,0,1);

So it will look like…

Code

...
/**
 * Execute some temporary code put in this space.
 */
function execute_temp()
{
   require_code('galleries');
   add_gallery('root',do_lang('ROOT'),'','','','',0,0,0,1);
}
...

Then load up the data_custom/execute_temp.php URL.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#18955
SMC
Avatar

Fan in training

Being the imapatient hands on shmuck that I am I ended up just creating a new gallerie and then editing the database and making that gallerie the root gallery, after some tweaking I got everything back to normal. Atleast I think I did. :D

Tell you a funny aside though, the side affect of multiple admins.

My other admin was working on the website at the same time. Turns out there is something wierd with our web setup that the chmod's the portal tries to make when you upload something dont stick.  So we have to go in and make the chmod's manually through FTP.  I dont think thats ocportal error I think its our website being too php strict but we didnt pay for the website it was a hand me down from someone that left the team so we havent had a time to research it.

The funny part though…

Just as I hit submit on one of my database changes, he uploaded a mod that didnt get chmoded and whitewashed the entire website. (Basically stripped the theme off of everything, no images, no color, just black text) Also succeeded in wiping out the admin page.

Well I thought OMG OMG WHAT DID I DO!?!?!? :D

Funny enough he needed to get the FTP password from me to fix it so he told me what happened.  Still took us a few minuts to make sure it WASNT me that fried it. But he was confident he knew what it was.

Note to selves: Let other admins know your working on the site.. :D

Hey, gotta learn sometime. :D

Thanks for your help. Gunna try to learn to be more patient on the things that can wait. :D

Back to the top
 
Posted
Rating:
#19000
Avatar

The gallery deletion bug has now been fixed :)

http://ocportal.com/membersonly/pg/catalogues/entry/64


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: