Hello.

After the update I get this error in admin/build/features/create



Fatal error: Maximum execution time of 90 seconds exceeded in /home/oscar/git/repositorios/redsocial/includes/database.mysqli.inc on line 0

Call Stack:
    0.0002     337956   1. {main}() /home/oscar/git/repositorios/redsocial/index.php:0
    0.5701   41618644   2. menu_execute_active_handler() /home/oscar/git/repositorios/redsocial/index.php:17
    0.5729   41874636   3. call_user_func_array() /home/oscar/git/repositorios/redsocial/includes/menu.inc:349
    0.5729   41874888   4. drupal_get_form() /home/oscar/git/repositorios/redsocial/includes/menu.inc:349
    0.5729   41876148   5. call_user_func_array() /home/oscar/git/repositorios/redsocial/includes/form.inc:103
    0.5729   41876464   6. drupal_retrieve_form() /home/oscar/git/repositorios/redsocial/includes/form.inc:103
    0.5729   41877568   7. call_user_func_array() /home/oscar/git/repositorios/redsocial/includes/form.inc:377
    0.5729   41877820   8. features_export_form() /home/oscar/git/repositorios/redsocial/includes/form.inc:377
    0.6574   45275296   9. features_invoke() /home/oscar/git/repositorios/redsocial/sites/all/modules/contrib/features/features.admin.inc:88
    0.6574   45275668  10. call_user_func_array() /home/oscar/git/repositorios/redsocial/sites/all/modules/contrib/features/features.module:405
    0.6574   45275920  11. elysia_cron_features_export_options() /home/oscar/git/repositorios/redsocial/sites/all/modules/contrib/features/features.module:405
    0.6575   45276000  12. ctools_component_features_export_options() /home/oscar/git/repositorios/redsocial/sites/all/modules/contrib/features/includes/features.ctools.inc(24) : eval()'d code:1
    0.6575   45276164  13. _ctools_features_export_default_list() /home/oscar/git/repositorios/redsocial/sites/all/modules/contrib/features/includes/features.ctools.inc:115
    0.6575   45276164  14. ctools_export_default_list() /home/oscar/git/repositorios/redsocial/sites/all/modules/contrib/features/includes/features.ctools.inc:275
    0.6575   45276328  15. ctools_export_crud_load_all() /home/oscar/git/repositorios/redsocial/sites/all/modules/contrib/ctools/includes/export.inc:997
    0.6575   45276372  16. elysia_cron_ctools_export_load_all() /home/oscar/git/repositorios/redsocial/sites/all/modules/contrib/ctools/includes/export.inc:116
  107.2722   45279316  17. db_fetch_object() /home/oscar/git/repositorios/redsocial/sites/all/modules/contrib/elysia_cron/elysia_cron.ctools.inc:67

I'm not sure if is the same bug or similar to http://drupal.org/node/1354576
Thanks

Oskar

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

oskar_calvo’s picture

Assigned: gotheric » oskar_calvo
Status: Needs review » Active

I'm lookin at it, hope to have a patch soon.

Oskar

oskar_calvo’s picture

Status: Active » Needs review
FileSize
3.22 KB

Here is the patch.

killua99’s picture

Status: Needs review » Needs work
+++ b/elysia_cron.ctools.inc
@@ -58,18 +58,19 @@ function elysia_cron_ctools_export_load_all() {
+    $sql = db_query("SELECT name, disable, rule, weight, context, running, last_run, last_aborted, abort_count, last_abort_function, last_execution_time, execution_count, avg_execution_time, max_execution_time, last_shutdown_time  FROM {elysia_cron}");

If you're gonna use all the columns name why don't use SELECT *? is more easy to read. And the variable I'll use $result.

The rest good job.

oskar_calvo’s picture

If you check Drupal's Coding standards you will find the answer:

http://drupal.org/node/374660

Oskar

gotheric’s picture

Assigned: Unassigned » gotheric
Status: Needs work » Patch (to be ported)

Thanks for the patch, i'll apply it to the code and release a new version soon.

I'll keep an eye on the "select *" thing, very interesting.

gotheric’s picture

Status: Patch (to be ported) » Needs review

I've modified the code to avoid every "select *" queries.
It's committed in 2.x-dev branch.

(I'll release a new stable release as soon as i've commited some other things)

craigmc’s picture

Assigned: oskar_calvo » gotheric
Status: Active » Needs review

Will look into the patch.
I did find a possible bug in elysia_cron.ctools.inc that could cause an infinite loop and/or another logic error.

Specifically: elysia_cron_ctools_export_load_all() around line 67

  else {
    $objects = array();
    while ($o = db_fetch_object(db_query("select * from {elysia_cron}"))) {
      $objects = $o;
    }
  }

Couple things-- I know that PHP will evaluate the value of db_query once on the first execution, but this just doesn't read right to my sensibility.
The larger issue is that instead of adding the results to an array of objects, it's simply overwriting the object itself.

Then later in the function, there's a foreach ($objects as $object). I'm surprised PHP doesn't barf on this immediately, but this seems to be causing part of the issue.

gotheric’s picture

@craigmc: You are right, that piece of code is WRONG.
This affect only the D6 version, i'm committing the patch in DEV version.
Thanks

killua99’s picture

Some patch after committing?

chingis’s picture

I've got new error PHP Fatal error: Cannot access empty property elysia_cron.ctools.inc on line 109 after applying patch #2

chingis’s picture

FileSize
4.38 KB

#2 + fix for empty property, looks like elisya_cron 6.x-2.0 work with old version of ctools

kndr’s picture

I can't confirm #10 but last commited fix (6x-2x-dev) has a bug. Look at http://drupal.org/node/1394784#comment-5594674

gotheric’s picture

I've just committed in D6 Dev branch a new patch that should solve ctools problem.
But i made it in a little different way than #11 patch... trying to mantain compatibility with old versions of ctools.
Hope this is working, let me know!

AlfTheCat’s picture

Just used the 2.x dev with ctools 1.8, worked perfectly! Thanks!

kala4ek’s picture

Assigned: gotheric » Unassigned
Status: Needs review » Closed (outdated)

Drupal 6 is not supported anymore.