Modify

Opened 14 years ago

Closed 9 years ago

Last modified 9 years ago

#7377 closed defect (worksforme)

Solve menu display conflict problem

Reported by: Robin Owned by: Rob Guttman
Priority: normal Component: DynamicFieldsPlugin
Severity: blocker Keywords:
Cc: Robin, bjornar Trac Release: 0.11

Description (last modified by Ryan J Ollos)

It seems that this plugin sometimes would affect the menus, there is something wrong with the javascript code on some pages. Here is my solution:
open the file ~/templates/dynfields.html and do the following changing:

var apply_rules = function(){
    var input = $(this);
    var triggers = get_triggers();
       
    // execute the rule lifecycle...
       
    // setup each rule
    jQuery.each(triggers, function(trigger,specs){
        jQuery.each(specs, function(i,spec){
            try {
            spec.rule.setup(input, spec);
            }catch(e) {
            }
    });
    });
       
    // apply each rule
    jQuery.each(triggers, function(trigger,specs){
        jQuery.each(specs, function(i,spec){
            if (input.attr('id') != specs.selector.slice(1))
                return;
            try {
                spec.rule.apply(input, spec);
            }catch(e){
            }
        });
    });
       
    // complete each rule
    jQuery.each(triggers, function(trigger,specs){
        jQuery.each(specs, function(i,spec){
            if (input.attr('id') != specs.selector.slice(1))
                return;
            try {
                spec.rule.complete(input, spec);
            }catch(e) {
            }
        });
    });
}

Attachments (0)

Change History (10)

comment:1 Changed 14 years ago by anonymous

Robin, thanks for this. Defensive programming is good but I don't want to mask the root problem. Instead I would prefer to understand and fix it.

Can you share more what exactly is and isn't working for you with this plugin - including any apparent side effects you're seeing? The more info (including trac.ini configs for this plugin) you can share the better. Thx.

comment:2 Changed 14 years ago by Rob Guttman

Robin, please share what exactly is and isn't working for you with this plugin - including any apparent side effects you're seeing. Without more info I do not understand the problem and will need to close this ticket as invalid. Thanks.

comment:3 Changed 14 years ago by Rob Guttman

Resolution: worksforme
Status: newclosed

Robin, you haven't responded so I'll assume you're no longer having this problem. If you are, please reopen this ticket. Thanks.

comment:4 Changed 14 years ago by Robin

Resolution: worksforme
Status: closedreopened

Hi Robguttman,

I'm so sorry that I missed this ticket. If I enable the plugin, it makes the MenusPlugin unable to work well. The main reason is that the javascript code on dynfields.html file would affect the superfish.js file which is the basic package for MenusPlugin.

Thanks,

Robin

comment:5 Changed 13 years ago by bjornar

Severity: normalblocker

This plugin breaks the Wyswig plugin, it removes that menu option, this makes me unable to use your plugin, aka. a blocker

comment:6 in reply to:  4 Changed 13 years ago by Rob Guttman

Cc: Robin added; anonymous removed

Replying to robin:

Hi Robguttman,

I'm so sorry that I missed this ticket. If I enable the plugin, it makes the MenusPlugin unable to work well. The main reason is that the javascript code on dynfields.html file would affect the superfish.js file which is the basic package for MenusPlugin.

Thanks,

Robin

Robin, now it's my turn to apologize for the delayed response. I just tried and am unable to reproduce your problem using Trac 0.12.2 using Firefox 4.0.1. What versions are you using? If you're still having this problem (and still care), would you be able to send me the relevant parts of your trac.ini file?

comment:7 in reply to:  5 Changed 13 years ago by Rob Guttman

Cc: bjornar added

Replying to bjornar:

This plugin breaks the Wyswig plugin, it removes that menu option, this makes me unable to use your plugin, aka. a blocker

bjornar, I just tried and am unable to reproduce your problem using Trac 0.12.2 using Firefox 4.0.1. What versions are you using? What exact menu option are you talking about? Would you be able to send me the relevant parts of your trac.ini file?

comment:8 Changed 13 years ago by Rob Guttman

Robin and bjornar, one reason why both may be having problems is that my plugin caused a javascript error before loading the javascript for the other plugins you're using. I've just fixed an issue that may have been the cause of the JS errors, so if interested please try this plugin again using the latest code.

If you still can't get it to work after that, please use your browser's developer tools (or Firebug on Firefox) to track down any javascript errors you see. If you do see one, please paste all of the details you can here including the full error, what web browser and version you're using, and ideally the portion of your trac.ini file that define your rules.

Lastly, be sure to use the 0.11 version of this plugin - not the 0.12 version!

comment:9 Changed 9 years ago by Ryan J Ollos

Resolution: worksforme
Status: reopenedclosed

comment:10 Changed 9 years ago by Ryan J Ollos

Description: modified (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Rob Guttman.
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.