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.


Cron error on site map...

Login / Search

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

Community saint

I get this undefined index whenever the cron job tries to create the site index…   checked the database, there is indeed an index on m_join_time in that table..

Code

<div class="red_alert" role="error">This is an error that has been elevated to critical error status because it occurred during the primary error mechanism reporting system itself (possibly due to it occuring within the standard output framework). It may be masking a secondary error that occurred before this, but was never output - if so, it is likely strongly related to this one, thus fixing this will fix the other.</div>
<div style="padding-left: 50px">PHP NOTICE [8] Undefined index:  m_join_time in sources/sitemap.php(277) : eval()&#039;d code on line 51 (version: 9.0.2, PHP version: 5.2.17, URL: /home1/paulsfly/public_html/data/cron_bridge.php)<div class="box guid_{_GUID}"><div class="box_inner"><h2>Stack trace&hellip;</h2><p>File -> &#039;/home1/paulsfly/public_html/sources/failure.php&#039;<br />
Line -> 693<br />
Function -> &#039;die_html_trace&#039;<br />
Args -> array (
  0 =&gt; &#039;PHP NOTICE [8] Undefined index:  m_join_time in sources/sitemap.php(277) : eval()&amp;#039;d code on line 51 (version: 9.0.2, PHP version: 5.2.17, URL: /home1/paulsfly/public_html/data/cron_bridge.php)&#039;,
)<br />
</p>
<p>File -> &#039;/home1/paulsfly/public_html/sources/global2.php&#039;<br />
Line -> 1009<br />
Function -> &#039;_fatal_exit&#039;<br />
Args -> array (
  0 =&gt; &#039;PHP NOTICE [8] Undefined index:  m_join_time in sources/sitemap.php(277) : eval()\&#039;d code on line 51&#039;,
)<br />
</p>
<p>File -> &#039;/home1/paulsfly/public_html/sources/failure.php&#039;<br />
Line -> 220<br />
Function -> &#039;fatal_exit&#039;<br />
Args -> array (
  0 =&gt; &#039;PHP NOTICE [8] Undefined index:  m_join_time in sources/sitemap.php(277) : eval()\&#039;d code on line 51&#039;,
)<br />
</p>
<p>File -> &#039;/home1/paulsfly/public_html/sources/global2.php&#039;<br />
Line -> 872<br />
Function -> &#039;_ocportal_error_handler&#039;<br />
Args -> array (
  0 =&gt; &#039;notice&#039;,
  1 =&gt; 8,
  2 =&gt; &#039;Undefined index:  m_join_time&#039;,
  3 =&gt; &#039;sources/sitemap.php(277) : eval()\&#039;d code&#039;,
  4 =&gt; 51,
)<br />
</p>
<p>File -> &#039;/home1/paulsfly/public_html/sources/sitemap.php(277) : eval()\&#039;d code&#039;<br />
Line -> 51<br />
Function -> &#039;ocportal_error_handler&#039;<br />
Args -> array<br />
</p>
<p>File -> &#039;/home1/paulsfly/public_html/sources/sitemap.php(277) : eval()\&#039;d code&#039;<br />
Line -> 59<br />
Function -> &#039;get_sitemap_pagelinksmembers28516_16&#039;<br />
Args -> array (
  0 =&gt; &#039;pagelink_to_sitemapsxml&#039;,
  1 =&gt; 1,
  2 =&gt; 3,
  3 =&gt; &#039;:members:&#039;,
)<br />
</p>
<p>File -> &#039;/home1/paulsfly/public_html/sources/sitemap.php&#039;<br />
Line -> 277<br />
Function -> &#039;eval&#039;<br />
</p>
<p>File -> &#039;/home1/paulsfly/public_html/sources/sitemap.php&#039;<br />
Line -> 62<br />
Function -> &#039;spawn_page_crawl&#039;<br />
Args -> array (
  0 =&gt; &#039;pagelink_to_sitemapsxml&#039;,
  1 =&gt; 1,
  2 =&gt; NULL,
  3 =&gt; 3,
)<br />
</p>
<p>File -> &#039;/home1/paulsfly/public_html/sources/hooks/systems/cron/sitemap.php&#039;<br />
Line -> 41<br />
Function -> &#039;sitemaps_build&#039;<br />
Args -> array (
)<br />
</p>
<p>File -> &#039;/home1/paulsfly/public_html/sources/misc_scripts.php&#039;<br />
Line -> 197<br />
Function -> &#039;run&#039;<br />
Class -> &#039;Hook_cron_sitemap&#039;<br />
Type -> &#039;-&gt;&#039;<br />
Object -> Hook_cron_sitemap::__set_state(array(
))<br />
Args -> array (
)<br />
</p>
<p>File -> &#039;/home1/paulsfly/public_html/data/cron_bridge.php&#039;<br />
Line -> 37<br />
Function -> &#039;cron_bridge_script&#039;<br />
Args -> array (
  0 =&gt; &#039;/home1/paulsfly/public_html/data/cron_bridge.php&#039;,
)<br />
</p>
</div></div></div>

Paul
Back to the top
 
Posted
Rating:
#92343
Avatar

IIRC you said you altered the member directory to order my edit date. Did you break the members module get_sitemap_pagelinks function?

Code

$groups=$GLOBALS['FORUM_DB']->query_select('f_members',array('id','m_username AS title','m_join_time'),NULL,'',500,$start);
...
call_user_func_array($callback,array($pagelink,$pagelink_stub.'misc',$row['m_join_time'],NULL,0.2,$row['title'])); // Callback


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

Community saint

not sure, must have.

Code


                  call_user_func_array($callback,array($pagelink,$pagelink_stub.'misc',get_option('use_joindate')?$row['m_join_time']:$row['m_last_visit_time'],NULL,0.2,$row['title'])); // Callback


Paul
Back to the top
 
Posted
Rating:
#92345
Avatar

There you go. If you want m_last_visit_time to be the sitemap date, just make sure it's included in the select query above it.


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

Community saint

I thought I did:

Code

do
         {      // memeberslist date choice modification
         
             if (get_option('use_lastondate')) {  // lastondate turned on, get and index by last_visit_time
             
              $groups=$GLOBALS['FORUM_DB']->query_select('f_members',array('id','m_username AS title','m_last_visit_time'),NULL,'',500,$start);
                } else {
                    // lastondate off, joindate on or off, still get and index by join_time
                    $groups=$GLOBALS['FORUM_DB']->query_select('f_members',array('id','m_username AS title','m_join_time'),NULL,'',500,$start);
                }

            foreach ($groups as $row)
            {
               if ($row['id']!=db_get_first_id())
               {
                  $pagelink=$pagelink_stub.'view:'.strval($row['id']);
                  
                  // need to learn what do to here for modification
                  call_user_func_array($callback,array($pagelink,$pagelink_stub.'misc',get_option('use_joindate')?$row['m_join_time']:$row['m_last_visit_time'],NULL,0.2,$row['title'])); // Callback
               }
            }

            $start+=500;
         }


Paul
Back to the top
 
Posted
Rating:
#92347
Avatar

Config option naming inconsistency:
use_joindate vs use_lastondate

One name seems to be the inverse of the other. Maybe you really did add two options, but if you did they would be required to be oppositely configured and could not be.


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

Community saint

Yes, two options, but the function should only call one as both can be set to on, changed the line to

Code


                  call_user_func_array($callback,array($pagelink,$pagelink_stub.'misc',get_option('use_lastondate')?$row['m_last_visit_time']:$row['m_join_time'],NULL,0.2,$row['title'])); // Callback

so it is consistent.  Now will wait until next time it tries to do it (don't know how often that is) and see if I get an error back again.  Thanks.

Paul
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: