Either it needs to be added or the following line needs to be removed from htmlpurifier.module:455:
$settings['#attached']['js'][] = "$module_path/config-form.js";

Comments

fonant’s picture

Title: confirg-form.js is missing » config-form.js is missing

I get this too.

stephenrobinson’s picture

I get:

Warning: file_get_contents(sites/all/modules/contrib/htmlpurifier/config-form.js) [function.file-get-contents]: failed to open stream: No such file or directory in drupal_build_js_cache() (line 4776 of /www/www-staging/drupal.sandbox.sanger.ac.uk/htdocs/includes/common.inc).

In the htmlpurifier.module:
$settings['#attached']['js'][] = "$module_path/config-form.js";
but this doesnt exist???

jaroslaw.kaminski’s picture

I found config-form.js in htmlpurifier 7.x-1.x-dev package. I think author of module forgot about it ;-)

ezyang’s picture

Yeah, it got mysteriously nuked. Restoring...

bike2live’s picture

Restoring when? It still isn't there. We can grab it from the 7.x-1.x version, but is that the correct code?

salvis’s picture

@ezyang: Did you forget to push?

rudetrue’s picture

I also get this error in my watchdog logs.

allan1015’s picture

Same here, error in logs
I copied file over from 7.x-1.x - things seem to be working

salvis’s picture

Priority: Normal » Major

Seems like ezyang has vanished...

thekevinday’s picture

While restoring he triggered the opening of a wormhole that sucked him into another universe.

prudal’s picture

Got him =) ... he traveled back into time and landed in 27 Oct 2010!
see http://drupalcode.org/project/htmlpurifier.git/commit/ff99450

Missing config-form.js can be found there.

heddn’s picture

Status: Active » Closed (fixed)

The script was restored as of ff9945035fd640a473fd4fb3c8d2e3168550a19a.

salvis’s picture

Status: Closed (fixed) » Active

Please post a link into the repository viewer.

heddn’s picture

Assigned: Unassigned » heddn
Status: Active » Closed (fixed)
salvis’s picture

Assigned: heddn » Unassigned
Status: Closed (fixed) » Active
StatusFileSize
new53.17 KB

The script was restored as of ff9945035fd640a473fd4fb3c8d2e3168550a19a.

Interesting. The active 7.x-2.x-dev is based on the master branch, and the file is not present in the HEAD of the master branch:

http://drupalcode.org/project/htmlpurifier.git/tree/ab71e69ecb06b0e70d40...

The commit that you list is in the 7.x-1.x branch, which was branched off the master branch on 2010-09-28. The maintainer was obviously confused about Git. He abandoned the 7.x-1.x branch on 2010-11-12 — this branch is now irrelevant. It should be removed from the repository to avoid further confusion.

@heddn: What is your mission in this thread? Why are you spreading obvious mis-information? And why are you assigning yourself to a thread that you insist should be closed?
Assigning yourself means "I'm working on this issue and will post a patch or equivalent solution" and it's used to tell everyone else that they should hold off working on the same issue to avoid useless duplicate work. You've made three other bogus assignments to yourself in this queue — please undo these!

#918466-5: Alter hooks on configuration for advanced configuration is the most ridiculous one and for
#1427370-1: Unnecessary variable_set in version check you owe an apology to jcisio who has developed the patch.

Screenshot of repository log.

heddn’s picture

@salvis
Whoa there, I'm still learning the ropes about git, queue moderation and working with the community so I appreciate your input. DIdn't mean to ruffle any feathers here. I'll work with @ezyang to fix the issue.

ezyang’s picture

I'm extremely confused about the repository history post-Git migration.

The 7.x-1.x branch is a parent of the 6.x-2.x branch. What's going on with those commits? Did we lose more commits?

heddn’s picture

I think I'm going to join the confusion camp... there seems to be plenty of company.

@ezyang, does master have the 7.x-2.x code in it? I made the assumption it did when I create the patch in #16. I think what caused my confusion in the first place is that the git instructions for htmlpurifier only had one 7.x branch and I didn't pay attention to the fact it was for 1.x and not 2.x.

http://drupal.org/project/htmlpurifier/git-instructions
$ git branch -r
origin/5.x-1.x
origin/6.x-1.x
origin/6.x-2.x
origin/7.x-1.x
origin/HEAD -> origin/master
origin/master

salvis’s picture

I'm not sure what you did on 2010-11-12, but the result is that the commits in the 7.x-1.x branch are not in the master branch, and the current 7.x-2.x-dev package is based on the master branch.

We don't really need to understand what happened. To go forward from here, you should inspect the commits in the 7.x-1.x branch and decide which ones are still relevant and should be applied (from bottom to top) to the master branch. You may be able to do this with git's cherry-pick command, but be prepared to reset --hard if the result is not as expected.

@ezyang:

The 7.x-1.x branch is a parent of the 6.x-2.x branch.

What makes you write that? The common ancestor of 6.x-2.x and master (and, much later, 7.x-1.x) is b44ea29.

Time progresses upwards in #15. 6.x-2.x was branched off the master branch before ("below") the commit shown at the bottom of the screenshot; its tip is 9e965e8; that's where it ends, so far. 6.x-1.x was branched off the master branch with 558c007.

heddn’s picture

StatusFileSize
new4.24 KB

So I did a comparison today of master and 7.x-1.x. Here's a run down of what I saw. For the most part it is fairly trivial differences. The exception is in htmlpurifier.module so I've attached a diff report along with my textual analysis. Hopefully this clears up the confusion.

ezyang’s picture

Hello heddn; a file-by-file comparison is not so useful; the idea is we want to cherry pick the missing commits.

ezyang’s picture

Resolved by 'git merge -s ours 7.x-1.x' on master, and then FF'ding 7.x-1.x to the new commit.

ezyang’s picture

Status: Active » Fixed

And then cherry-picking two commits which were lost in the shuffle. It is too bad Drupal will not let me delete the master branch pointer.

Status: Fixed » Closed (fixed)

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

salvis’s picture

It is too bad Drupal will not let me delete the master branch pointer.

You can remove all files from the master branch and add just a README.txt file that explains where the code is.

Anonymous’s picture

Status: Closed (fixed) » Active

I've just pulled the 2.x branch via drush this morning, and I'm still experiencing this error. Looking in my sites/all/modules/contrib/htmlpurifier folder, it appears the config-form.js file is once again not present.

salvis’s picture

Indeed, the -dev version is still on the master branch which has not been updated for 7 months:

(screenshot)

There is no 7.x-2.x branch in this repository.

The last commit was made 6 weeks ago in the 7.x-1.x branch, but there's no version or snapshot that would make these efforts available to the public.

Please give me full access rights to this project so that I can fix it for you.

heddn’s picture

I agree, it would be nice to have all this fixed. I just opened issue #1778334: Cleanup git branches to fix the problem with master and -dev version that you mention. Do you think that it summarizes the problem correctly and provides an easy path to resolution?

salvis’s picture

Yes, that's about it. I thought you were cleaning this up half a year ago...

heddn’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
Status: Active » Fixed
salvis’s picture

It looks good now, thanks.

Status: Fixed » Closed (fixed)

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