Comments

ankitchauhan’s picture

welcome,

As installation and usage instructions are quite important for us to review, please take a moment to make your project page follow the tips for a great project page.

We do really need more hands in the application queue and highly recommend to get a review bonus so we can come back to your application sooner.

regards

ankitchauhan’s picture

Issue summary: View changes

Change git url to full git clone command

hkirsman’s picture

Issue summary: View changes

Add project review

hkirsman’s picture

I've updated the project page. It doesn't exactly follow "Tips for a great project page". For example there's no screenshots. I hope screencast is enough and even better.

I've helped out more in application queue since last comment from ankitchauhan.

Do I have to post the reviewed link in new post to get bonus? I saw somebody did that multiple times.

DmitriyMakeev’s picture

Useful module, but I found some bugs.

1. Module is incompatible with "Jquery Update". Firebug give that:
uncaught exception: Syntax error, unrecognized expression: [value=01.jpg]
But without Jquery Update it works.

2. I can't see blinking line in top right corner. The panel shown when I slowly move mouse in that corner.

3. Don't use jQuery(document).ready(). You need to change JavaScript behaviors. Use

(function ($) {
  Drupal.behaviors.initPerfecto = {
    attach: function (context) {
      ...
    }
  }
})(jQuery);


And some of my wishes for your module:
- Try to add theme('perfecto_composition') to the page without ajax, like "Admin Menu". Becouse when I refresh the page, I have to wait until the panel will load the images.
- Set initial position of the image to the center of the screen.

hkirsman’s picture

Thank you DmitriyMakeev for review!

I will fix these erros as soon as possible. I'll comment and ask some questions first.

1. Will check it out.

2. It probably didn't work because it blinks only once on first pageview. You had "uncaught exception" error then.

I didn't want it to blink all the time but only when one first learns to use Perfecto.

3. I didn't see anything useful in behaviours over $().ready(). Perfecto should be loaded only once. I understand behaviours are called for every ajax call too - don't want that to happen.

In D7 every JS is put inside behaviours without exception?

4. I'll try that out!

5. Good idea! Top 0 and horizontally centered.

developers_rtpl’s picture

Hello ,
First of all I would like to mention that your module name is very interesting.I really like the name.
You can add detailed description of your module on its project page so that it can be easy for others to understand the flow of the module.
You can add how it differs from other similar projects(you mentioned above) in detail.Right now you have just mentioned the version compatibility difference between your module and the other similar module.Check http://drupal.org/node/894256 for more details.
It would be beneficial for you if you will consider these points at the initial stage of your project.

Thanks!

hkirsman’s picture

Thank you DmitriyMakeev and developers_rtpl!

I've now fixed and updated all you've brought up:
* Works with jQuery Update
* Use behaviours
* Includes all images to DOM. It still works with ajax but should be better. I have to append the HTML after </body> so I can't include it with PHP.
* Initial position is center top. I've also set reset button to center the composition.
* Added screenshots, "How to use", "Similar projects" to project page.

ps. DmitriyMakeev, blinking only occurs after your first upload.
pps. Good to hear that I've chosen good name, developers_rtpl! ;)

klausi’s picture

Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: http://drupal.org/node/1804580
Project 2: http://drupal.org/node/1773848

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

hkirsman’s picture

How do I get bonus for reviewing other projects? I did one here: http://drupal.org/node/1706904#comment-6572114

klausi’s picture

Please follow #1410826: [META] Review bonus. Don't forget to add all your reviews to the issue summary and to add the "PAReview: review bonus" tag.

hkirsman’s picture

Issue summary: View changes

Rephrased a sentence.

hkirsman’s picture

Issue tags: -PAreview: review bonus

Can I apply for review bonus if I haven't yet? I mean I've added review links to this issue, but not written all the links to issue summary of my post or added PAReview: review bonus tag.

hkirsman’s picture

Issue tags: +PAreview: review bonus

Applying for first review bonus.

klausi’s picture

Status: Needs review » Needs work
Issue tags: +PAreview: security

manual review:

  1. perfecto_permission(): use "restrict access" => TRUE to mark a permission as dangerous.
  2. perfecto_unmanaged_delete_page_callback(): this vulnerable to CSRF, the delete link is not protected by a token or a confirmation form. Please read http://drupal.org/node/178896 again.
  3. Same for perfecto_disable_module_page_callback().
  4. perfecto_composition_panel_page_callback(): why print() and not return?

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

hkirsman’s picture

1. Done
2. Done
3. Done
4. Because it's a small snippet of HTML I'm getting with ajax call. Don't need the whole theme.

hkirsman’s picture

Status: Needs work » Needs review
hkirsman’s picture

For some reason my tags where preset differently than klausi set it.

hkirsman’s picture

Trying to put back the tags klausi set.

klausi’s picture

Please don't remove the security, we keep that for statistics and to show examples of security problems.

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects. Please add your new reviews to the issue summary.

klausi’s picture

Issue summary: View changes

Added more reviews to get first review bonus

cubeinspire’s picture

Status: Needs review » Needs work

Nice work, I like the design of this module !

There is an additional security issue here.

The file name is saved and displayed as it is on the admin page, that allows to insert files names like: <script>alert('hello');</script>.png
Some OS doesn't allow to create filenames with the / symbol but other yes. This can at least break the page and at worst be used as an XSS attack.

You can use check_plain at line 304 to solve that.
'filename' => check_plain($file->filename),

This line of javascript is giving me problems because I don't have clear url's enabled. The ajax call leads to a 404 response.
var compositionControlPanel = Drupal.settings.basePath + 'admin/settings/perfecto/composition_control_panel';

When I set this to the compatible value : var compositionControlPanel = Drupal.settings.basePath + '?q=admin/settings/perfecto/composition_control_panel';

There is an infinite loop of calls because the result of the call is inserted after the body ( with the same ajax call that inserts agains after the body etc etc ).

That's not an issue but more an idea maybe for other projects, why not to use variable_get() and variable_set() to store the fid of the managed_files so its easier to delete them later ?

You can create a reference of an managed file on the database by using:
file_usage_add(stdClass $file, $module, $type, $id, $count = 1)

hkirsman’s picture

Thanks, logicdesign!

1.
I tried creating

alert('hello');

.png file but could not create it. How do you escape forward slash?
I managed to create this file:
touch \

alert\(\'hello\'\)\;\<.png I've added check_plain for any precaution. 2. About the path problem. I wonder why it didn't work? I disabled clean urls on my site and everything works! And it should have worked if you changed the url to ?q=... That page should only give you the html for the panel not the whole drupal theme. If you get the latter, then yeah infinite loop will occur because js is called again and again. The problematic page is called in perfecto_composition_panel_page_callback(), line 144 in perfecto.module. Any thoughts? 3. I used the unmanaged file api, because maby somebody want's to upload files directly with ftp etc. So it's a feature of this module :)
klausi’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

If you reopen this please keep in mind that we are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)

klausi’s picture

Issue summary: View changes

Added new review

hkirsman’s picture

Issue tags: +PAreview: review bonus

Reopening the issue, reviewed 3 projects, adding PAReview: review bonus tag.

Also fixed the clean url problem cubeinspire had.

hkirsman’s picture

Status: Closed (won't fix) » Active
hkirsman’s picture

Status: Active » Needs review
redsd’s picture

Status: Needs review » Needs work

Hi Hkirsman,

Very nice work first off. I looked at the code and couldn't find any flaws.

I checked the workings using a super admin account and a normal admin account running firefox 20 en and the lastest Chrome version 26.0.1410.64. Everything seems to be working accordingly!

I would still have 2 notes that you might be able to implement before the release of your module.

  • A way to minimize the toolbar to adjust the image, it's blocking part of my view and I would like to hide it on command so I can see the entire screen
  • Set a maximum size on your dropdown box(id: perfecto-imagecompositioncontrols-files) because the dropdown falls offscreen because I use images that have longnames.

1 problem that isn't that big, but you might want to try and fix (if it's even possible).

  • When I use the webbrowsers zoom (ctrl+ & ctrl-) the image gets displaced so i have to readjust it again

I hope it helps.

hkirsman’s picture

Status: Needs work » Needs review

Tx, redsd! I've limited the select size and added minimize feature.

I also tried to add browser zoom support. First of all there's no native support for detecting zoom. I found code to detect zoom in chrome but that alone doesn't help me. I think you need to find some element that is inside the site (for example logo) and relative to that and zoom level start to position the overlay. So I'm not going to support this now.

I also set default branch and and fixed a minor bug report by pareview.

Let me know if you find anything else! :)

kscheirer’s picture

Title: Perfecto » [D7] Perfecto
Status: Needs review » Reviewed & tested by the community

You have a typo in the @file block in perfecto.module: "weg".

You use the string 'public://mod_perfecto' in many places, that should probably be a define or variable instead.

In perfecto_check_multiple_access_controls_access_callback() you can get a slight performance gain by just returning TRUE as soon as a valid permission is found. Currently the code will check all the permissions passed in.

In perfecto-admin.css you should have a blank line between the definitions.

What is /*[fmt]1A20-1A0B-E*/ at the top of perfecto-control-panel.css?

Those issues all seem minor though, and I did not find any security issues.

----
Top Shelf Modules - Enterprise modules from the community for the community.

hkirsman’s picture

Fixed! Thank you very many! :)

/*[fmt]1A20-1A0B-E*/ - Stylizer ( http://www.skybound.ca/ ) uses this to know how the editor is configured. It's nicer if it's not there so I removed it.

klausi’s picture

Status: Reviewed & tested by the community » Fixed

Looks good to me!

Thanks for your contribution, hkirsman!

I updated your account to let you 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 get 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.

hkirsman’s picture

StatusFileSize
new1.8 KB

Thanks all!

Allthough I have full access now, could I come here for reviews for another project (If I do reviews for others)?

klausi’s picture

This queue is used for new contributors, there is a peer review group for this purpose https://groups.drupal.org/peer-review (although it might be hard to get a response there I suppose).

hkirsman’s picture

Ok, tx, klausi!

Status: Fixed » Closed (fixed)

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

hkirsman’s picture

StatusFileSize
new4.18 KB

Testing.

hkirsman’s picture

Issue summary: View changes

New reviews.