Focal Point Batch process all images that have not been previously processed by the Focal Point module. Installing Focal Point on an existing site may cause issues if there are entities with a large number of large images attached. This modules tells you how many images have not been processed and provides a way to batch process them.

Drupal Sandbox: https://www.drupal.org/sandbox/kevincrafts/2540958

Drupal: 7.3x

Git Clone Url : git clone --branch 7.x-1.x http://git.drupal.org/sandbox/kevincrafts/2540958.git focal_point_batch

Dependencies:
https://www.drupal.org/project/focal_point

Manual reviews:
https://www.drupal.org/node/2512512#comment-10334117
https://www.drupal.org/node/2541442#comment-10334199
https://www.drupal.org/node/2563333#comment-10337563

Comments

krknth’s picture

Manual Review :

I installed these module with drush command - "drush en focal_point_batch -y"

Then @ admin/config/media/focal_point_batch page, I am getting these error

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'fm.type' in 'field list': SELECT fm.fid AS fid, fm.uri AS uri, fm.type AS type FROM {file_managed} fm WHERE (fm.type = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => image ) infocal_point_batch_all_images() (line 105 of/private/var/www/drupal7/sites/all/modules/focal_point_batch/focal_point_batch.module).

Fix comment standards

Add @param: Function parameters

Ref : https://www.drupal.org/node/1354

Function : focal_point_batch_trigger_form_submit()

Add $operations = array(); before foreach loop

kevincrafts’s picture

Fixed #1 with query that does not depend on media module: http://cgit.drupalcode.org/sandbox-kevincrafts-2540958/commit/?id=f9a08fa

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

kevincrafts’s picture

Status: Active » Needs review
kreynen’s picture

Issue summary: View changes

added a manual review so move this along

kevincrafts’s picture

I did a manual review of the Background image formatter project - https://www.drupal.org/node/2506013#comment-10334181

kevincrafts’s picture

Issue summary: View changes
nitvirus’s picture

Hi,

Did the manual review of the project. Ran the module through the coder, which no notices or warnings.

In the project description please write the dependencies, as this module had dependency on the Focal Point.

nitvirus’s picture

Also,

You needed to remove the $focal_point_estimate after the module has been uninstalled.

kevincrafts’s picture

Issue summary: View changes
kevincrafts’s picture

Regarding #9, I think the task of removing the focal point values, variables, etc should belong to the focal point module.

kevincrafts’s picture

Issue summary: View changes
kreynen’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +PAreview: review bonus

I don't even understand #9. Projects should only delete variables they create, but that only applies to variable_set. The only reference to $focal_point_estimate I'm seeing is in _focal_point_batch_process_single where it is passed to _focal_point_guess_default where it is stored in db. The module being reviewed doesn't have an install or a single variable_set.

http://cgit.drupalcode.org/sandbox-kevincrafts-2540958/tree/focal_point_...
http://cgit.drupalcode.org/focal_point/tree/focal_point.module#n470

While this function could be rewritten to remove 1 line as...

function _focal_point_batch_process_single($fid) {
  module_load_include('module', 'focal_point');
  $images = array(
    'fid' => $fid,
    'focal_point' =>  _focal_point_guess_default($fid),
  );
  _focal_point_images_save($images);
}

That is really a style choice and not a release blocker.

Bumping this up to RBTC w/ the bonus.

It's worth noting that @kevincrafts already has commit access to projects owned by https://www.drupal.org/u/university-of-colorado-boulder.

nitvirus’s picture

Ok,
That cleared it up.
Thanks

klausi’s picture

Status: Reviewed & tested by the community » Fixed

Review of the 7.x-1.x branch (commit f9a08fa):

  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    
    FILE: /home/klausi/pareview_temp/focal_point_batch.module
    ---------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 1 LINE
    ---------------------------------------------------------------------------
     115 | ERROR | [x] There must be exactly one blank line before the tags in
         |       |     a doc comment
     115 | ERROR | [ ] Missing parameter comment
     115 | ERROR | [ ] Missing parameter name
    ---------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------
    
    Time: 62ms; Memory: 6.75Mb
    
  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

manual review:

  1. project page is too short. How does the module solve the problem? See also https://www.drupal.org/node/997024
  2. focal_point_batch_processed(): the foreach is not needed here, just use ->fetchAllKeyed(0, 0) to get the keyed array.

But otherwise looks good to me, so ...

Thanks for your contribution, kevincrafts!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.