Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Since 2.x versions the module doesn't include simplehtmldom library. It should be downloaded manually and put it in sites/all/libraries/simplehtmldom/..
The problem is that users often don't read release notes and readme files before an upgrade.
Proposed resolution
We can use hook_requirements to notify users about necessity of installing simplehtmldom library.
Comment | File | Size | Author |
---|
Comments
Comment #1
amool CreditAttribution: amool commentedComment #2
amool CreditAttribution: amool commentedI've implemented the hook & its working for me. Kindly review it.
1. I've moved: to newly created `helper_function.inc`
2. I'm including `helper_function.inc` in both simplehtmldom.install & simplehtmldom.module
3. Now simple cache implementation in _simplhtmldom_get_library_path() has
instead of
Comment #3
Konstantin Komelin CreditAttribution: Konstantin Komelin commentedThank you @amool for the contribution! The patch has been committed.
Commit: http://drupalcode.org/project/simplehtmldom.git/commit/e5962da
However, I had to fix some issues. Please review them carefully:
module_load_include('inc', 'simplehtmldom', 'helper');
instead ofrequire_once(dirname(__FILE__).'/helper_function.inc');
return $library_path. "/$file";
Please use coder module to check coding standards in the future.
Thanks,
Konstantin
Comment #4
Konstantin Komelin CreditAttribution: Konstantin Komelin commented@amool would you like to provide a patch for Drupal 6 version based on our latest commit for Drupal 7?
Comment #5
Konstantin Komelin CreditAttribution: Konstantin Komelin commentedSince @amool is silent I'll have to reproduce the changes introduced in this issue for Drupal 6 myself.
Comment #6
amool CreditAttribution: amool commented@konstain.komelin: Sorry, I was bit busy with other work. I wanted to respond when I'm done with the other work. I'd like to provide patch for Drupal 6 too. Please give me a day or two.
Comment #7
amool CreditAttribution: amool commentedComment #8
Konstantin Komelin CreditAttribution: Konstantin Komelin commentedSure. Thank you so much for your help @amool.
Comment #9
Konstantin Komelin CreditAttribution: Konstantin Komelin commented@amool I have to ask you about progress by this important task. Let me know if you don't have time.
Comment #10
Konstantin Komelin CreditAttribution: Konstantin Komelin commentedNo need to worry anymore. I will implement this patch myself.
Comment #11
Konstantin Komelin CreditAttribution: Konstantin Komelin commentedDone for 6.x-2.x: http://drupalcode.org/project/simplehtmldom.git/commit/f40a9f8
Comment #12
amool CreditAttribution: amool commented@konstantin: Sorry! I couldn't do it. I couldn't find time. I'm having my exams :(
But thanks a lot for making me contributor. It feels great to have a project to maintain. Its my first :)
Comment #13
Konstantin Komelin CreditAttribution: Konstantin Komelin commented@amool thanks again for your contribution! Keep it up!