Page MenuHomePhabricator

Behavior definitions not registered in some project dialogs
Closed, InvalidPublic

Description

Editing project pictures or project policies fails in strange ways:

  • when editing project pictures in the "Choose Icon and Color" dialog the first click (on a color or on an icon) already returns using the default selection(screenshot ) .On Firefox, if the javascript debugger is enabled, an error message appears:
Error: JX.initBehavior(map): behavior(s) not registered: icon-composer
  • when editing project details and selecting "Custom Policy ..." for any of the view, edit or join policies the dialog does not contain a table for entering rules (screenshot ). On Firefox, if the javascript debugger is enabled, an error message appears:
Error: JX.initBehavior(map): behavior(s) not registered: policy-rule-editor

This behavior is persistent and occurs in different browsers on different computers.
As can be seen from the screenshots, a corresponding javascript file "behavior-icon-composer" or "behavior-policy-rule-editor.js" seems to be loaded but the function therein is not found when building the page content.

The bug still appears on the latest Phabricator version https://secure.phabricator.com/rP2cdc40eb004a125418ec4e127ef9209ab446a3cd.

Event Timeline

Nothing here reproduces for me. Are you able to reproduce this issue on a known good installation of Phabricator? Either here or on http://phacility.com?

Generally, multiple JS issues point towards an issue outside of Phabricator (proxy, cache, update procedures).

I'm having difficulty reproducing this. Here's what I did:

  • I launched Firefox, and navigated to a project manage page.
  • I opened the console, then clicked "Edit Icon and Color".
  • I clicked several icon/color selection buttons.

This worked properly, and did not produce any errors:

I notice in one of your screenshots, a resource named <...>.pagespeed.<...> is being loaded. We do not serve this resource, and the resource paths which we serve do not look like this one. Do you have mod_pagespeed enabled in Apache, or otherwise know why this resource request is being generated (maybe you have a browser extension, or a CDN filter like "RocketLoader")?

Indeed, the case seems to be connected with caching. If the browser cache is cleared and the project manage page is reloaded the policy-rule-editor is indeed found and a custom policy can be edited. However, this occurs only once. When the page is reloaded, or if another project is edited afterwards the issue is back - and can be remedied by emtying the cache, again.

So it seems, that it is not really Phabricator but the caching. On the other hand, I do not know, how to get out of this situation. I am using the recent Bitnami Phabricator stack and the recommended settings for apache and php. The stack also comes with a pagespeed module for apache. Disabling it just caused the .pagespeed resources to disappear in favour of plain javascript resources from Phabricator, but it had no effect on the issue itself.

This problem is probably the same as the one in task T10120. This is probably related to caching since clearing the cache restore the functionnality (at least for some times).
However, in our case, we have a regular httpd server without any mods installed.
Do you have any ideas of how we could debug that ?

chad closed this task as Invalid.EditedFeb 24 2016, 3:09 PM

I am using the recent Bitnami Phabricator stack

Unfortunately we're not affiliated with Bitnami, and have no insight into their stack or Phabricator build. Your best bet is to contact them for support with the information you've gathered here. Officially the upstream only provides support from installation via our guides. Good Luck!

See also T4854 -- mod_pagespeed is known to be incompatible with Phabricator, and should not be used.