Modify

Opened 9 years ago

Closed 9 years ago

#12251 closed defect (worksforme)

Plugin is not working for trac 1.0.4

Reported by: torsten.piotraschke@… Owned by: Ryan J Ollos
Priority: normal Component: DynamicFieldsPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

I built the egg on the machine that is running trac and rebooted the machine. But using hide_always still shows my custom field in the new/edit ticket form and in the ticket view. I can see the plugin activated in the Admin-Web-UI.

Since I've nowhere read of such trouble, I guess I've simply installed it wrongly. However, I have no clue what installation part is missing.

Tested with

  • Chrome 41.0.2272.76
  • Firefox 36.0
  • Opera 12.16
[components]
customselectadmin.admin.customselectpanel = enabled
datefield.filter.customfieldadmintweak = disabled
datefield.filter.datefieldmodule = disabled
dynfields.rules.clearrule = enabled
dynfields.rules.copyrule = enabled
dynfields.rules.defaultrule = enabled
dynfields.rules.hiderule = enabled
dynfields.rules.setrule = enabled
dynfields.rules.validaterule = enabled
dynfields.web_ui.dynamicfieldsmodule = enabled
talm_importer.importer.importmodule = enabled
tracopt.ticket.deleter = enabled

[ticket-custom]
test = text
test.hide_always = true
PaketVersion
Trac 1.0.4
Babel 0.9.6
Docutils 0.11
Genshi 0.7 (with speedups)
mod_wsgi 3.4 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
Pygments 1.4
pysqlite 2.6.0
Python 2.7.5 (default, Jun 17 2014, 18:11:42) [GCC 4.8.2 20140120 (Red Hat 4.8.2-16)]
pytz 2012d
setuptools 14.3
SQLite 3.7.17
jQuery 1.7.2
jQuery UI 1.8.21
jQuery Timepicker 1.0.1

Installed Plugins

Name Version
AdvancedTicketWorkflowPlugin 1.2.0dev-r0
CustomSelectAdmin 0.6.1
GroupTicketFields 0.0.1dev-r0
TicketImport 0.8.3
TracDateField 1.1.0.post0
TracDynamicFields 2.2.0.dev0

Attachments (0)

Change History (17)

comment:1 Changed 9 years ago by Ryan J Ollos

Please take a look in the Trac log trac:TracTroubleshooting#ChecktheLogs, as well as the browser console.

comment:2 Changed 9 years ago by torsten.piotraschke@…

Opera/9.80 (X11; Linux x86_64) Presto/2.12.388 Version/12.16 (Core 2.12.388)
Type "clear()" to clear the console.
Type "// help()" for more information.
Das verlinkte Skript wurde nicht geladen.
Das verlinkte Skript wurde nicht geladen.
Das verlinkte Skript wurde nicht geladen.
Uncaught exception: TypeError: Cannot convert 'spec.rule' to object

Error thrown at line 46, column 12 in <anonymous function>(i, spec) in http://www.xyz.com/dynfields/dynfields.html:
    spec.rule.setup(input, spec);
called via Function.prototype.call() from line 608, column 7 in <anonymous function: each>(a, c, d) in http://www.xyz.com/chrome/common/js/jquery.js:
    if (c.call(a[g], g, a[g++]) === !1)
called from line 45, column 8 in <anonymous function>(trigger, specs) in http://www.xyz.com/dynfields/dynfields.html:
    jQuery.each(specs, function(i,spec){
called via Function.prototype.call() from line 603, column 7 in <anonymous function: each>(a, c, d) in http://www.xyz.com/chrome/common/js/jquery.js:
    if (c.call(a[f], f, a[f]) === !1)
called from line 44, column 4 in <anonymous function>() in http://www.xyz.com/dynfields/dynfields.html:
    jQuery.each(triggers, function(trigger,specs){
called via Function.prototype.apply() from line 1761, column 7 in <anonymous function: dispatch>(c) in http://www.xyz.com/chrome/common/js/jquery.js:
    c.data = s.data, c.handleObj = s, o = ((f.event.special[s.origType] || {}).handle || s.handler).apply(q.elem, g), o !== b && (c.result = o, o === !1 && (c.preventDefault(), c.stopPropagation()))
called via Function.prototype.apply() from line 1616, column 5 in <anonymous function: i>(a) in http://www.xyz.com/chrome/common/js/jquery.js:
    return typeof f != "undefined" && (!a || f.event.triggered !== a.type) ? f.event.dispatch.apply(i.elem, arguments) : b
called via Function.prototype.apply() from line 1713, column 5 in <anonymous function: trigger>(c, d, e, g) in http://www.xyz.com/chrome/common/js/jquery.js:
    m = r[l][0], c.type = r[l][1], q = (f._data(m, "events") || {})[c.type] && f._data(m, "handle"), q && q.apply(m, d), q = o && m[o], q && f.acceptData(m) && q.apply(m, d) === !1 && c.preventDefault();
called from line 2005, column 4 in <anonymous function: trigger>() in http://www.xyz.com/chrome/common/js/jquery.js:
    f.event.trigger(a, b, this)
called via Function.prototype.call() from line 608, column 7 in <anonymous function: each>(a, c, d) in http://www.xyz.com/chrome/common/js/jquery.js:
    if (c.call(a[g], g, a[g++]) === !1)>>>

grepping the log for "dyn" outputs this:

2015-03-27 11:52:28,097 Trac[loader] DEBUG: Loading dynfields.rules from /data/trac/xyz/plugins/TracDynamicFields-2.2.0.dev0-py2.7.egg
2015-03-27 11:52:28,099 Trac[loader] DEBUG: Loading dynfields.web_ui from /data/trac/xyz/plugins/TracDynamicFields-2.2.0.dev0-py2.7.egg
2015-03-27 11:52:29,364 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/dynfields/dynfields.html'">
2015-03-27 11:52:29,942 Trac[loader] DEBUG: Loading dynfields.rules from /data/trac/xyz/plugins/TracDynamicFields-2.2.0.dev0-py2.7.egg
2015-03-27 11:52:29,944 Trac[loader] DEBUG: Loading dynfields.web_ui from /data/trac/xyz/plugins/TracDynamicFields-2.2.0.dev0-py2.7.egg
2015-03-27 11:52:30,164 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/dynfields/dynfields.html'">
Last edited 9 years ago by Jun Omae (previous) (diff)

comment:3 Changed 9 years ago by Ryan J Ollos

Could you try disabling your plugins one by one, restarting the server each time and testing?

comment:4 Changed 9 years ago by torsten.piotraschke@…

I'm not able to restart the server at the moment.

However, also by not restarting I could narrow the error down to the following module: DynamicFieldsModule — A module that dynamically alters ticket fields based an extensible set of rules. Uses jQuery for full implementation.

Since it also states that it uses jQuery and the error above points to a jquery error, I guess this is the cause.

If I deactivate that module, there's no error in the console. If I activate it, there is.

comment:5 Changed 9 years ago by anonymous

With the mentioned setting I just restarted the server and still the plugin doesn't work.

I used the hide_always = true feature, but the text-field is still visible. There's no error in the browser console and the log says the plugin gets loaded.

comment:6 Changed 9 years ago by Ryan J Ollos

You need to try disabling the other plugins though. We are looking for a conflict and want to see if DynamicFieldsPlugin works on your Trac instance with the other plugins disabled. Conflicts occur regularly with these JavaScript-based plugins.

comment:7 Changed 9 years ago by torsten.piotraschke@…

Oh, I'm sorry. I'll give you infos about that tonight (UTC).

comment:8 Changed 9 years ago by torsten.piotraschke@…

Alright, I just disabled every plugin, left all modules of the DynamicFieldsPlugin enabled and rebooted. But I still get the spec.rule error. I didn't disable any plugin listed in the "Trac 1.0.4" plugin (i. e. trac.about.*, trac.admin.api.* etc.).

comment:9 Changed 9 years ago by torsten <torsten.piotraschke@…>

Forget what I just said. I noticed some inconsistencies in my activations in the components section of my trac.ini. There's no jscript error anymore, but the hide function is still not working.

I'll stay with what I said in comment:7 and will be back tonight.

comment:10 in reply to:  9 Changed 9 years ago by Ryan J Ollos

Replying to torsten <torsten.piotraschke@…>:

There's no jscript error anymore, but the hide function is still not working.

I've noticed that a field is always hidden when hide_always is specified, whether it is true or false. Is that the most recent behavior you were seeing? I'll fix that issue in this ticket.

comment:11 Changed 9 years ago by torsten.piotraschke@…

No, unfortunately not. The behaviour I was witnessing was that no command ever worked. When I was specifiying hide_always true, the field was still visible.

comment:12 Changed 9 years ago by Ryan J Ollos

Could you try installing again with r14719 of the plugin (dynamicfieldsplugin/trunk)? It would also be good to confirm that dynfields.js, layout.js and rules.js are added to the page.

comment:13 Changed 9 years ago by torsten.piotraschke@…

I installed the current trunk from here. I unzipped it on our trac server, built it by executing python setup.py bdist_egg and copied the egg to the plugin folder.

Using Firefox' inspector, I could see that the files in question spawn [HTTP/1.1 404 Not Found 2ms] errors.

Last edited 9 years ago by Ryan J Ollos (previous) (diff)

comment:14 Changed 9 years ago by Ryan J Ollos

Are you running a web server? You may need to deploy your static assets: trac:TracInstall#MappingStaticResources.

comment:15 Changed 9 years ago by torsten.piotraschke@…

Yes, I'm running Apache. I'll have a look at the link.

comment:16 Changed 9 years ago by Ryan J Ollos

Owner: changed from Rob Guttman to Ryan J Ollos
Status: newaccepted

comment:17 Changed 9 years ago by Ryan J Ollos

Resolution: worksforme
Status: acceptedclosed

Closing as worksforme, but feel free to reopen if you make more progress on installing the latest version of the plugin and redeploying the static files.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.