• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

if TWiki:Codev.TipsContrib is not installed, there are errors in the pages

the include should use a warn="" parameter so that no error shows (and nothing is shown) if TipsContrib isn't installed.

WN

dammit, maybe we should not be littering the release with 'bits' that are not in the release! rather we need to work out a way for the installation of those optional bits to put their bits in if / when they are installed. this is Exactly the same as the Wysiwyg Compose button.

please? -- SD

While I agree with SD's sentiment about "optional bits," my impression was that TipsContrib was going to be included in the distribution (although, in the end, I'm neutral on that). If it's included then this isn't an issue. LB

TipsContrib is part of te release, so no issue there. Nevertheless, for sites that uninstall it, we can use a CALC that includes the topic conditionally, $IF($EXISTS(...), ...). -- PTh

  • This solution is better, but relies on that SpreadSheetPlugin is included. What happens if a user uninstalls that one? -- TW

The system has to be resilient against such contribs not being included. Only if a functionality is part of the core code can we rely on the functionality to be there. If something is in a plugin or contrib, the system must function if that plugin or contrib is not installed. -- TW

Further, if this contrib is meant to be included, it should really be included. Currently, when doing a svn up you do not get this contrib installed. -- TW


Looking at the tips contrib, it is heavily dependent on Spreadsheet plugin and cannot be decoupled. The Spreadsheet plugin should be listed in the DEPENDENCIES for the contrib module and documented as a dependency in the contrib topic.

Without spreadhsheet plugin it doesn't crash, it just looks a mess.

The inclusion of the TWikiTipsOfTheDayInclude should be controlled by an %IF statement to avoid this kind of issue. That requires a context identifier to be set for the spreadsheet plugin so the inclusion is not attempted if the plugin is not there.

The best way to do this is to set a context identifier for every enabled plugin. This is something I had meant to do, but had forgotten. So I added it, SVN 7237

So you should be able to use %IF viz. %IF{"context SpreadSheetPluginEnabled" then="%INCLUDE{%TWIKIWEB%.TWikiTipsOfTheDayInclude}%"}%

CC

Great... that will also help out Item804 -- TW


there's also this simple solution:

twikibuilder@ubuntu:~/twiki/DEVELOP/data/TWiki$ svn diff WebHome.txt
Index: WebHome.txt
===================================================================
--- WebHome.txt (revision 7279)
+++ WebHome.txt (working copy)
@@ -24,7 +24,7 @@
 <a href="http://twiki.org"><img src="%ATTACHURLPATH%/twiki_home.gif" alt="Link to TWiki.org website" width='337' height='93' border='0' /></a>
 <br />
 <br />
-%INCLUDE{TWikiTipsOfTheDayInclude}%
+%INCLUDE{"TWikiTipsOfTheDayInclude" warn=""}%
 </td></tr></table>

 ---++ Disclaimer

WN

Make it so. (isn't warn="off" the correct usage, though?)

CC

%INCLUDE{ "TWikiTipsOfTheDayInclude" warn="off" }% is the correct way, and much easier than the conditional CALC.

-- PTh

btw, by "simple solution", i meant hack. sven is absolutely right in that the base shouldn't know about optionally installable bits. a better component architectural design is needed, but that's not something for DakarRelease...

twikibuilder@ubuntu:~/twiki/DEVELOP/data$ svn diff Sandbox/WebLeftBar.txt TWiki/WebHome.txt
Index: Sandbox/WebLeftBar.txt
===================================================================
--- Sandbox/WebLeftBar.txt      (revision 7296)
+++ Sandbox/WebLeftBar.txt      (working copy)
@@ -10,6 +10,6 @@
    * [[WebNotify][ %ICON{"notify"}% %MAKETEXT{"Notifications"}%]]
    * [[WebStatistics][ %ICON{"statistics"}% %MAKETEXT{"Statistics"}%]]
    * [[WebPreferences][ %ICON{"wrench"}% %MAKETEXT{"Preferences"}%]]
-%INCLUDE{%TWIKIWEB%.TWikiTipsOfTheDayInclude}%
+%INCLUDE{ "%TWIKIWEB%.TWikiTipsOfTheDayInclude" warn="off" }%
 %INCLUDE{ "%TWIKIWEB%.WebLeftBarWebsList" }%
 </div>
Index: TWiki/WebHome.txt
===================================================================
--- TWiki/WebHome.txt   (revision 7296)
+++ TWiki/WebHome.txt   (working copy)
@@ -24,7 +24,7 @@
 <a href="http://twiki.org"><img src="%ATTACHURLPATH%/twiki_home.gif" alt="Link to TWiki.org website" width='337' height='93' border='0' /></a>
 <br />
 <br />
-%INCLUDE{TWikiTipsOfTheDayInclude}%
+%INCLUDE{ "TWikiTipsOfTheDayInclude" warn="off" }%
 </td></tr></table>

 ---++ Disclaimer

SVN:7297

WN

ItemTemplate
Summary TipsContrib include errors
ReportedBy WillNorris, ThomasWeigert
AppliesTo Engine
Priority Normal
CurrentState Closed
WaitingFor

Checkins 7237 7238 7297
Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r12 - 2005-11-04 - WillNorris
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback