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.


CEDI Tree Link --> Stack Trace

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#27775 (In Topic #6403)
Avatar

Community saint

Hello All!

Anyone else getting a error by clicking the Tree link under CEDI? I've attached the stack trace below. I've also verified that sources/splurgh.php is correct as reported here and corrected here, but still getting an error.

Any thoughts?

cya, SD


Code

 PHP NOTICE [8] Undefined offset: 1 (ocPortal version: 3.0.17, PHP version: 5.1.2, URL: /ocportal/site/index.php?page=cedi&type=tree)
Here is the stack trace:

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    '/var/www/ocportal/sources/global2.php'
Line    '690'
Function    'get_html_trace'
Args    

File    '/var/www/ocportal/sources/global2.php'
Line    '430'
Function    'clean_exit'
Args    

'PHP NOTICE [8] Undefined offset: 1'

File    '/var/www/ocportal/sources/splurgh.php'
Line    '80'
Function    'ocportal_error_handler'
Args    

8

'Undefined offset: 1'

'/var/www/ocportal/sources/splurgh.php'

80

array

File    '/var/www/ocportal/sources/splurgh.php'
Line    '51'
Function    '_splurgh_do_node'
Args    

array

1

''

array

0

File    '/var/www/ocportal/site/pages/modules/cedi.php'
Line    '907'
Function    'splurgh_master_build'
Args    

'id'

array

object

'cedi_tree_made'

1168293496

File    '/var/www/ocportal/site/pages/modules/cedi.php'
Line    '240'
Function    'tree'
Class    'Module_cedi'
Type    '->'
Args    

File    '/var/www/ocportal/sources/zones.php'
Line    '300'
Function    'run'
Class    'Module_cedi'
Type    '->'
Args    

File    '/var/www/ocportal/sources/site.php'
Line    '640'
Function    'load_module_page'
Args    

'site/pages/modules/cedi.php'

'cedi'

File    '/var/www/ocportal/sources/site.php'
Line    '510'
Function    'request_page'
Args    

'cedi'

true

File    '/var/www/ocportal/site/index.php'
Line    '42'
Function    'do_site'
Args    

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#27776
Avatar

Community saint

I know a lot about this system but that is not some thing I have seen I am sure Chris will know how to fix it.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#27792
Avatar

Hello,

I've made a patch around this which will be included in 3.1.0, but the underlying problem isn't a bug, it's corrupt data – somehow your root CEDI page has gone missing from the database. To fix it I'd go into phpMyAdmin, view the rows for the seedy_pages table, and edit the first one so the ID field is set to 1.


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:
#27811
Avatar

Community saint

Hi Chris!

Thanx for the tip! Unfortunately all looks well at this end and on my "test" box as far as the database and id are concerned. Same failure issue with both with the cedi tree link.

. I've attached a screen shot from phpMyAdmin. I also tried removing all the pages listed in the table except for the first one (id 1), but the issue persists.

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#27815
Avatar

Actually, I can see what is happening now. The guest member doesn't have access to the root CEDI page, and the tree is generated for guests (for security and efficiency reasons).
The fix I made was to change line 34 of sources/splurgh.php from:

Code

   if (is_null($first_id)) $first_id=db_get_first_id();
to:

Code

   if (is_null($first_id)) $first_id=db_get_first_id();

   if (!array_key_exists($first_id,$map)) return '';
(i.e. add two new lines)

However, perhaps the best solution is to grant guests access to the root CEDI page, yet deny them access to the CEDI module as a whole if it is this that they shouldn't have access to.


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:
#27817
Avatar

Community saint

Hi Chris!

I chose the second option (permission setting for guest) and that nailed it. All good now. Thank-you muchly!

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: