Did you release the page builder plugin?
I know you were trying to override the Links::Fatal call.
A quick and dirty work around is found at the top of the Site_Html.pm
# -----------------------------------------------------------------
# Returns a specified template parsed.
#
my ($template, $vars, $opts) = @_;
my $code = exists $Links::SiteHTML::{"site_html_$template"} ? $Links::SiteHTML::{"site_html_$template"} : _compile ("site_html_$template");
defined $code or die "Invalid method: site_html_$template called.";
GT::Plugins->dispatch ($CFG->{admin_root_path} . '/Plugins', "site_html_$template", $code, $vars, $opts);
}
replace the "or die...." with function call to
sub site_html_error
Where you can do things like check if the fail was with link data, or category data, or for personal pages, and display an error page.
Just make sure to check that you do not get into a recursive call. You might want to set a counter variable, to check that.
You could make the "or die..." a function call to another module, even, so on upgrades all you'd need to do is change that one phrase to the new function call.
That is the pre-fail condition if there is no hard-coded template routine, or a template on-disk.
It would be nice if Links had an error handler that allowed overriding specific error conditions, but all errors do not go through the Links::Error handler, such as the "die" condition, which is trapped, but not really handled.
Anyway, this specific "override" condition seems easy enough... it won't generalize to other error conditions, only the "template not found" condition.
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.
I know you were trying to override the Links::Fatal call.
A quick and dirty work around is found at the top of the Site_Html.pm
Code:
sub display { # -----------------------------------------------------------------
# Returns a specified template parsed.
#
my ($template, $vars, $opts) = @_;
my $code = exists $Links::SiteHTML::{"site_html_$template"} ? $Links::SiteHTML::{"site_html_$template"} : _compile ("site_html_$template");
defined $code or die "Invalid method: site_html_$template called.";
GT::Plugins->dispatch ($CFG->{admin_root_path} . '/Plugins', "site_html_$template", $code, $vars, $opts);
}
replace the "or die...." with function call to
sub site_html_error
Where you can do things like check if the fail was with link data, or category data, or for personal pages, and display an error page.
Just make sure to check that you do not get into a recursive call. You might want to set a counter variable, to check that.
You could make the "or die..." a function call to another module, even, so on upgrades all you'd need to do is change that one phrase to the new function call.
That is the pre-fail condition if there is no hard-coded template routine, or a template on-disk.
It would be nice if Links had an error handler that allowed overriding specific error conditions, but all errors do not go through the Links::Error handler, such as the "die" condition, which is trapped, but not really handled.
Anyway, this specific "override" condition seems easy enough... it won't generalize to other error conditions, only the "template not found" condition.
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.