Joomla 3 cannot disable custom plugin - plugins

I just installed a custom plugin in Joomla 3 and now I cannot disable it.
When I click disable (or edit) I receive "Internal Server Error".
xml file:
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.0" type="plugin" group="content">
<name>Content - Availability Calendar</name>
<author>Joomla! Project</author>
<creationDate>2010</creationDate>
<copyright>Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>support#msc.gr</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>1.5</version>
<description></description>
<files>
<filename plugin="calendar">calendar.php</filename>
<filename>index.html</filename>
</files>
<params>
<param name="unit_id" type="text" size="5" default="50" label="Villa ID" description="Villa ID"/>
</params>
</extension>

You're XML code is old and is based on the code used for Joomla 1.5. You need to replace the following:
<params>
<param name="unit_id" type="text" size="5" default="50" label="Villa ID" description="Villa ID"/>
</params>
with this:
<config>
<fields name="params">
<fieldset name="basic">
<field name="unit_id" type="text" size="5" default="50" label="Villa ID" description="Villa ID"/>
</fieldset>
</fields>
</config>
Then for each new parameter you want to add, simply add a new <field>

Related

[Wix][PostgreSQL] How to add an install condition in bundle

I'm trying to add a condition before installing PostgreSQL on Wix bundle.
I'm expecting it to check if there is an installed version of PostgreSQL as you can see on my following code:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle Name="Title" Version="1.0.0.0" Manufacturer="Manufacture" UpgradeCode="5aee5af2-10c7-42d1-bde6-c7dadf736786">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense"/>
<?define InstallPgCommand=--unattendedmodeui minimal --mode unattended --superpassword "super_pwd" --servicename "service_name" --servicepassword "service_pwd" --serverport 5433?>
<Chain>
<!-- Install postgres -->
<ExePackage
SourceFile="ThirdPartyApps\postgresql-14.3-1-windows-x64.exe"
Compressed ="yes"
Vital ="yes"
Permanent ="yes"
InstallCommand="$(var.InstallPgCommand)"
InstallCondition="NOT POSTGRESINSTALLED"
/>
</Chain>
</Bundle>
<Fragment>
<Property Id="POSTGRESINSTALLED">
<RegistrySearch Id="POSTGRESINSTALLED_SEARCH" Key="SOFTWARE\PostgreSQL\Installations\postgresql-x64-14" Root="HKLM" Type="raw" Name="Branding" />
</Property>
</Fragment>
</Wix>
But it didn't work as expect.
Can you tell me what I'm doing wrong ? Thanks everyone
RegistrySearch is for MSI packages. For bundles, use util:RegistrySearch instead.

What's wrong with my trace compass analysis?

I've generated an event stream with an lttng-ust, using the header file, contatining the following event declaration:
TRACEPOINT_EVENT(
random_chart,
point,
TP_ARGS(
int, value_arg
),
TP_FIELDS(
ctf_integer( int, value, value_arg )
))
After successfully opening it in a TraceCompass, I've tried to write an analysis with an XYChart, showing this value stream as a simple plot. My XML file contains the following:
<?xml version="1.0" encoding="UTF-8"?>
<!-- The state provider assigns states from events -->
<stateProvider id="org.eclipse.linuxtools.ust.random_chart" version="1">
<head>
<traceType id="org.eclipse.linuxtools.lttng2.ust.tracetype" />
<label value="Value chart analysis" />
</head>
<!-- Event handlers -->
<eventHandler eventName="random_chart:point">
<stateChange>
<stateAttribute type="constant" value="Dummy" />
<stateAttribute type="constant" value="Value" />
<stateValue type="eventField" value="value" />
</stateChange>
</eventHandler>
</stateProvider>
<!-- This is the definition of the XY chart view -->
<xyView id="my.test.xy.chart.view">
<head>
<analysis id="org.eclipse.linuxtools.ust.random_chart" />
</head>
<entry path="Dummy/Value">
<display type="constant" value="Value" />
<name type="self" />
</entry>
</xyView>
I can't see what's wrong with it (even after reading all the related xml-schema files in a git-repository).
I can import this successfully, but after clicking on an 'XML XY Chart View' I see an empty plot and a single (last in the event stream) value under the 'type filter text'.
AFAIK the 'State System Explorer' shows me correct 'Value at timestamp' corresponding to the 'Full attribute path' equal to 'Dummy/Value'. Probably I miss something.
EDIT1: I've tried to fix, but still have no luck:
<entry path="Dummy"> <display type="constant" value="Value" /> <name type="self" /> </entry>
EDIT2: Same problem with:
<entry path="Dummy/Value">
<display type="self" />
<name type="self" />
</entry>
You have 2 possibilities to fix the problem, given that you have only one attribute with data:
1- Change the <entry path="Dummy/Value"> to <entry path="Dummy"> and keep the rest
or
2- Keep your entry and change the display element to <display type="self" />
A display of type constant means it tries to read an attribute of that name under the main path, so here, it was trying to read "Dummy/Value/Value", which doesn't exist
EDIT: Here's a working example of the view part for your analysis:
<xyView id="my.test.xy.chart.view">
<head>
<analysis id="org.eclipse.linuxtools.ust.random_chart" />
<label value="Random view" />
</head>
<entry path="Dummy">
<display type="constant" value="Value" />
<name type="self" />
</entry>
</xyView>

finding target worksheet for action in twb (xml) file

My intention is to find target worksheet for actions in tableau workbook. where should I search for that target worksheet correspond to some particular action in twb(xml) file?
For example:
<actions>
<action caption='Filter 1 (generated)' name='[Action1]'>
<activation auto-clear='true' type='on-select' />
<source dashboard='Figure 8-60 thought 8-65' type='sheet' worksheet='Heat Map' />
<command command='tsc:tsl-filter'>
<param name='special-fields' value='all' />
<param name='target' value='Figure 8-60 thought 8-65' />
</command>
</action>
<action caption='Filter 2 (generated)' name='[Action2]'>
<activation auto-clear='true' type='on-select' />
<source dashboard='Figure 8-59' type='sheet' worksheet='Poor Filter Design' />
<command command='tsc:tsl-filter'>
<param name='special-fields' value='all' />
<param name='target' value='Figure 8-59' />
</command>
</action>
<action caption='Filter 3 (generated)' name='[Action3]'>
<activation auto-clear='true' type='on-select' />
<source dashboard='Figure 8-59' type='sheet' worksheet='Good Filter Design' />
<command command='tsc:tsl-filter'>
<param name='special-fields' value='all' />
<param name='target' value='Figure 8-59' />
</command>
</action>
</actions>
As you can see above code filter1 action got a param tag inside that target attribute is present, but the value present there is a dashoard name. What i want is target woksheet corresponded to the action filter.
Tried to play a bit with .twb file and got this for dashboard actions:
<actions>
<action caption='Filter 1 (generated)' name='[Action1]'>
<activation auto-clear='true' type='on-select' />
<source dashboard='Dashboard 1' type='sheet' worksheet='Sheet 3' />
<command command='tsc:tsl-filter'>
<param name='special-fields' value='all' />
<param name='target' value='Dashboard 1' />
</command>
</action>
<action caption='Filter 2 (generated)' name='[Action2]'>
<activation auto-clear='true' type='on-select' />
<source dashboard='Dashboard 2' type='sheet' worksheet='Sheet 2' />
<command command='tsc:tsl-filter'>
<param name='special-fields' value='all' />
<param name='target' value='Dashboard 2' />
</command>
</action>
<action caption='Filter 3 (generated)' name='[Action3]'>
<activation auto-clear='true' type='on-select' />
<source dashboard='Dashboard 2' type='sheet' worksheet='Sheet 3' />
<command command='tsc:tsl-filter'>
<param name='special-fields' value='all' />
<param name='target' value='Dashboard 2' />
</command>
</action>
</actions>
Honestly I couldn't find any direct link to the target sheet while source sheet is always available in actions, This can be observed in Actions window.
But I was able to see the actions that were mapped to target sheets if we go to the individual sheet actions instead of dashboard actions where we can see target as dashboard.
See below data where I have created a dummy dashboard to check actions.
These are the actions that created in report:
<group caption='Action (Product Category)' hidden='true' name='[Action (Product Category)]' name-style='unqualified' user:auto-column='sheet_link'>
<groupfilter function='crossjoin'>
<groupfilter function='level-members' level='[Product Category]' />
</groupfilter>
</group>
<group caption='Action (Product Sub-Category)' hidden='true' name='[Action (Product Sub-Category)]' name-style='unqualified' user:auto-column='sheet_link'>
<groupfilter function='crossjoin'>
<groupfilter function='level-members' level='[Product Sub-Category]' />
</groupfilter>
</group>
Along with this if we go to individual sheets then we can see the actions mapped first one is for Sheet 2 and other is for Sheet 3:
<filter class='categorical' column='[federated.0idnrl40bk56fg130xiy30dnljux].[Action (Product Category)]'>
<groupfilter function='level-members' level='[Product Category]' user:ui-enumeration='all' user:ui-marker='enumerate' />
</filter>
<slices>
<column>[federated.0idnrl40bk56fg130xiy30dnljux].[Action (Product Category)]</column>
</slices>
<filter class='categorical' column='[federated.0idnrl40bk56fg130xiy30dnljux].[Action (Product Sub-Category)]'>
<groupfilter function='level-members' level='[Product Sub-Category]' user:ui-enumeration='all' user:ui-marker='enumerate' />
</filter>
<slices>
<column>[federated.0idnrl40bk56fg130xiy30dnljux].[Action (Product Sub-Category)]</column>
</slices>
If we keep track of actions that were created in dashboards then we can easily tell what all sheets are joined in a dashboard using the name of the actions.
Would like to know your thoughts and observations aswell.
Changing the names of the actions
Going into the .twb XML and changing the order of the <> blocks.
Going into the .twb XML and changing the internal Action1, Action2, etc. names. Doing this I'm able to change which of Dashboard 2 and Dashboard 3 is opened.
adding a Web Page object to Dashboard 1 and then a URL action using about:blank as the target, on the idea that maybe URL actions take precedence over filter actions.

Default components in install4j

When my "installation components" screen runs (I'm in console mode, if it matters), I get the list of components to install, as expected. However, the "default" response is to accept 2 of the components, even though their "Initially Selected for installation" option is false.
I want the user to be able to NOT select any of the optional components, and this isn't possible when it's defaulting to have some of them "Selected".
As far as I can tell, there are no varfiles being loaded.
Snippet from my install4j file:
<component name="A" id="527" customizedId="a" displayDescription="false" hideHelpButton="false" selected="false" changeable="true" downloadable="false" hidden="false">
<description />
<include all="false">
<entry location=".i4j_external_314/a" fileType="regular" />
<entry location=".i4j_external_2366/a" fileType="regular" />
<entry location=".i4j_external_316/a" fileType="regular" />
<entry location=".i4j_external_8155/a" fileType="regular" />
<entry location=".i4j_external_318/a" fileType="regular" />
</include>
<dependencies />
</component>
<component name="B" id="528" customizedId="b" displayDescription="false" hideHelpButton="false" selected="false" changeable="true" downloadable="false" hidden="false">
<description />
<include all="false">
<entry location=".i4j_external_316/b" fileType="regular" />
<entry location=".i4j_external_8155/b" fileType="regular" />
<entry location=".i4j_external_318/b" fileType="regular" />
</include>
<dependencies />
</component>
<component name="C" id="69" customizedId="c" displayDescription="false" hideHelpButton="false" selected="false" changeable="true" downloadable="false" hidden="false">
<description />
<include all="false">
<entry location=".i4j_external_316/c" fileType="regular" />
<entry location=".i4j_external_8155/c" fileType="regular" />
<entry location=".i4j_external_318/c" fileType="regular" />
</include>
<dependencies />
Notice that in all 3 components, "selected" is false, and "changeable" is true.
When the installer runs, though, here is how it is presented:
Which components should be installed?
*: D
*: E
1: A
2: B
3: C
Please enter a comma-separated list of the selected values or [Enter] for the default selection:
[1,2]
(D and E are fine - they're set to "selected" and "not user changeable")
So, even though A and B are not "selected", they show up as a default. Also notice that "C" is configured the same way as "A" and "B", yet doesn't show up in the default.
This is problematic, because I have no way to select "none" of the optional components. I have to select at least 1 in order to not accept the default.
Thanks for any info - if you need more detail, I'd be happy to provide it.

Formatting XML files in eclipse

When i try to format a xml file in eclipse it puts each of the fields on a new line. instead i want each property to be on one line. for e.g. now when i press CTRL+SHFT+F, eclipse formats it like this.
<hibernate-mapping package="com.server.entities">
<class
name="Branch"
table="Branch"
>
<meta attribute="sync-DAO">false</meta>
<id name="Id"
type="java.lang.Long"
column="id"
>
<generator class="native"/>
</id>
<property
name="Created"
column="created"
type="timestamp"
not-null="false"
length="23"
/>
<property
name="LastUpdated"
column="lastUpdated"
type="timestamp"
not-null="false"
length="23"
/>
<property
name="CreatedBy"
column="createdBy"
type="java.lang.Long"
not-null="false"
length="19"
/>
but what i want is
<hibernate-mapping package="com.kaizen.report.server.entities">
<class name="Branch" table="Branch">
<meta attribute="sync-DAO">false</meta>
<id name="Id" type="java.lang.Long" column="id">
<generator class="native"/>
</id>
<property name="Created" column="created" type="timestamp" not-null="false" length="23"/>
If you're using the XML Editor from eclipse.org, go tot he XML Editor preference page and change the options to allow much longer lines and to not split multiple attributes each onto new lines.