[xwiki-users] Integrate mocca calendar and meeting application extensions

2016-06-22 Thread Mark Sack
Does anyone know of a way to integrate the meeting app and the mocca calendar
app? Or has anyone attempted to do this in the past? The idea is that, when
a meeting is created, the meeting would be automatically included in the
calendars of the participants. The appropriate updates would need to be made
when the meeting is modified, rescheduled or deleted of course.

Mark Sack



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Integrate-mocca-calendar-and-meeting-application-extensions-tp7600059.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] REST API ignores type parameter

2016-05-30 Thread Mark Sack
Sorry - I misread your explanation as only applying to XWQL. But without full
statements the call just retrieves specific documents. I want a call that
retrieves specific attributes of the users. 

I'll be very specific about what I'm trying to accomplish:
- I've added a date field to the user profile that contains the user's
birthday. The year is not entered or displayed so it defaults to 1970 in the
database.
- With a single REST call, I want to retrieve the first name, last name,
birthday and avatar image of all the users who are not hidden and whose
birthday is in a specific month (typically the current month).

I can figure out the where part of the clause . But without the select part
of the clause, it is not clear how I can retrieve multiple attributes in a
single statement. I hope this helps clarify where I'm stuck.

Regards
Mark



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/REST-API-ignores-type-parameter-tp7599586p7599735.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] REST API ignores type parameter

2016-05-27 Thread Mark Sack
For some reason, I can't get the select query to work as HQL either. I picked
a simple query (as a test) from 
http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples
and confirmed that it works in a velocity script in a test page.

But when I try to use the same query in the rest interface, the response is
as follows:

Not Found

The server has not found anything matching the request URI

You can get technical details here.
Please continue your visit at our home page. 

The rest url I used is as follows:

../rest/wikis/xwiki/query=q?select+obj.name+from+BaseObject+obj+where+obj.className%3D%27XWiki.XWikiUsers%27&type=hql

Regards
Mark Sack



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/REST-API-ignores-type-parameter-tp7599586p7599695.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] REST API ignores type parameter

2016-05-27 Thread Mark Sack
Created http://jira.xwiki.org/browse/XWIKI-13458
Please check that I got all of the parameters right.

Thanks for your help.

Mark Sack



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/REST-API-ignores-type-parameter-tp7599586p7599692.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] REST API ignores type parameter

2016-05-25 Thread Mark Sack
You're right - I was missing the wiki name. But, for some reason, I still
can't get the queries to work. Here is what I've found so far.

There is only one wiki - confirmed by the following REST call:
http://10.1.16.192/wiki/rest/wikis/ which returns

http://10.1.16.192:8080/wiki/rest/wikis/query";
rel="http://www.xwiki.org/rel/query"/>http://10.1.16.192:8080/wiki/rest/wikis/xwiki/spaces";
rel="http://www.xwiki.org/rel/spaces"/>http://10.1.16.192:8080/wiki/rest/wikis/xwiki/classes";
rel="http://www.xwiki.org/rel/classes"/>http://10.1.16.192:8080/wiki/rest/wikis/xwiki/modifications";
rel="http://www.xwiki.org/rel/modifications"/>http://10.1.16.192:8080/wiki/rest/wikis/xwiki/search";
rel="http://www.xwiki.org/rel/search"/>http://10.1.16.192:8080/wiki/rest/wikis/xwiki/query";
rel="http://www.xwiki.org/rel/query"/>xwikixwiki

I can get some information about the wiki using
http://10.1.16.192/wiki/rest/wikis/xwiki/ which returns

http://10.1.16.192:8080/wiki/rest/wikis/xwiki/spaces";
rel="http://www.xwiki.org/rel/spaces"/>http://10.1.16.192:8080/wiki/rest/wikis/xwiki/classes";
rel="http://www.xwiki.org/rel/classes"/>http://10.1.16.192:8080/wiki/rest/wikis/xwiki/modifications";
rel="http://www.xwiki.org/rel/modifications"/>http://10.1.16.192:8080/wiki/rest/wikis/xwiki/search";
rel="http://www.xwiki.org/rel/search"/>http://10.1.16.192:8080/wiki/rest/wikis/xwiki/query";
rel="http://www.xwiki.org/rel/query"/>xwikixwiki

I can get a list of spaces in the wiki using
http://10.1.16.192/wiki/rest/wikis/xwiki/spaces/
I won't reproduce the results as it is quite long but it looks correct and
includes those that I've added.

But if I try to do a simple query such as 

.../rest/wikis/xwiki/query?q=select+obj.first_name+from+Document+doc%2C+doc.object%28XWiki.XWikiUsers%29+as+obj&type=xwql

the result is

http://10.1.16.192:8080/wiki/rest/wikis/xwiki/query?q={query}(&type={type})(&number={number})(&start={start})(&orderField={fieldname}(&order={asc|desc}))(&distinct=1)(&prettyNames={false|true})(&wikis={wikis})(&className={classname})"/>

whereas the same query executed in velocity (without the URL encoding)
returns the correct result.

This is again probably some simple item I've overlooked. I appreciate your
help in resolving this problem.

Regards
Mark Sack





--
View this message in context: 
http://xwiki.475771.n2.nabble.com/REST-API-ignores-type-parameter-tp7599586p7599636.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] REST API ignores type parameter

2016-05-24 Thread Mark Sack
I'm trying to use the REST API to retrieve some data but the API seems to be
ignoring the type parameter.
My environment is XWiki 7.4.2, Debian 8, PostgreSQL, Tomcat 8, Openjdk 8

If I try to fetch some data using the browser and the following URL:

http:// ...
/rest/wikis/query?q=select%20obj.first_name,obj.last_name%20from%20Document%20doc,%20doc.object%28XWiki.XWikiUsers%29%20as%20obj&type=xwql

the result is as follows (I'm reproducing here only the first few lines -
there are actually 10 items returned)

http://10.1.16.192:8080/wiki/rest?q={solrquery}(&number={number})(&start={start})(&orderField={fieldname}(&order={asc|desc}))(&distinct=1)(&prettyNames={false|true})(&wikis={wikis})(&className={classname})">http://10.1.16.192:8080/wiki/rest/wikis/xwiki/spaces/XWiki/pages/DocumentTreeMacros";
rel="http://www.xwiki.org/rel/page"/>pagexwiki:XWiki.DocumentTreeMacrosXWiki.DocumentTreeMacrosxwikiXWikiDocumentTreeMacros2016-02-15T12:14:34-03:00xwiki:XWiki.Admin4.10.75986093http://10.1.16.192:8080/wiki/rest/wikis/xwiki/spaces/Panels/pages/DocumentInformation";
rel="http://www.xwiki.org/rel/page"/>pagexwiki:Panels.DocumentInformationPanels.DocumentInformationxwikiPanelsDocumentInformation2016-01-12T09:56:52-03:00xwiki:XWiki.superadmin1.10.63381535

The result is not related in any way to the user data or their names. From
the template on the first line, it seems to think that the query is a SOLR
query not xwql. I've verified that the query is correct xwql syntax and
gives a valid result by trying it in a velocity script on an actual xwiki
page. The result is basically the same if I just query for the first name
instead of both the first name and last name.

How should I be executing xwql queries using the REST API?

Regards
Mark Sack



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/REST-API-ignores-type-parameter-tp7599586.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] REST query to fetch filtered list of users and some of their attributes

2016-05-20 Thread Mark Sack
OK. I understand how to display the attributes on the web page with some more
velocity commands (i.e. a couple of for loops). But I'm still stuck on how
to translate that into a single REST call (in addition to the first problem
of the erroneous (perhaps my error) results in the REST call.

Thanks for the quick response. 
Mark



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/REST-query-to-fetch-filtered-list-of-users-and-some-of-their-attributes-tp7599550p7599552.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] REST query to fetch filtered list of users and some of their attributes

2016-05-20 Thread Mark Sack
In our Xwiki, I've added some fields such as birthday (of type Date) to the
user profile. I'd like to implement a REST call that retrieves all of the
non-hidden users with birthdays in a specific month (typically the current
month) and some specific attribute values. Right now the values I want are
the first name, last name, birthday and the link to the avatar image file. I
have bits and pieces of the solution but am having trouble with some parts -
specifically how to put it together into a single REST call.

PROBLEM 1: I can create a page with a script like the following to filter
some users and display their names.
{{velocity}}
#set ($tags=$services.query.xwql("select obj.first_name from Document doc,
doc.object(XWiki.XWikiUsers) as obj where (obj.first_name LIKE '%a%' and
(doc.hidden <> true OR doc.hidden is null))").execute())
$tags
{{/velocity}}

But if I try to execute that query in a REST call like the following, the
result is different
.../rest/wikis/query?q=select+obj.first_name+from+Document+doc%2C+doc.object%28XWiki.XWikiUsers%29+as+obj+where+%28obj.first_name+LIKE+%27%25a%25%27+and+%28doc.hidden+%3C%3E+true+OR+doc.hidden+is+null%29%29&type=xwql

The REST call returns some data completely unrelated to the users:
http://...rest?q={solrquery}(&number={number})(&start={start})(&orderField={fieldname}(&order={asc|desc}))(&distinct=1)(&prettyNames={false|true})(&wikis={wikis})(&className={classname})">http://...rest/wikis/xwiki/spaces/XWiki/pages/DocumentTreeMacros";
rel="http://www.xwiki.org/rel/page"/>pagexwiki:XWiki.DocumentTreeMacrosXWiki.DocumentTreeMacrosxwikiXWikiDocumentTreeMacros2016-02-15T12:14:34-03:00xwiki:XWiki.Admin4.10.62450576http://...rest/wikis/xwiki/spaces/XWiki/pages/DocumentTree";
rel="http://www.xwiki.org/rel/page"/>pagexwiki:XWiki.DocumentTreeXWiki.DocumentTreexwikiXWikiDocumentTree2016-01-27T10:23:05-03:00xwiki:XWiki.Admin2.10.5804536http://...rest/wikis/xwiki/spaces/Panels/pages/DocumentInformation";
rel="http://www.xwiki.org/rel/page"/>pagexwiki:Panels.DocumentInformationPanels.DocumentInformationxwikiPanelsDocumentInformation2016-01-12T09:56:52-03:00xwiki:XWiki.superadmin1.10.4841085

PROBLEM 2: If I try to implement a query that retrieves multiple fields from
the user profile like the following:
{{velocity}}
#set ($tags=$services.query.xwql("select obj.first_name, obj.last_name,
obj.birthday from Document doc, doc.object(XWiki.XWikiUsers) as obj where
(obj.first_name LIKE '%a%' and (doc.hidden <> true OR doc.hidden is
null))").execute())
$tags
{{/velocity}}

the data displayed in the xwiki page looks like the following instead the
actual attribute values:

[[Ljava.lang.Object;@723f4d95, [Ljava.lang.Object;@4054e1bb,
[Ljava.lang.Object;@436c8d04, [Ljava.lang.Object;@5c93ddc1,
[Ljava.lang.Object;@54c86023, [Ljava.lang.Object;@33760a38,
[Ljava.lang.Object;@14d5b5ff, [Ljava.lang.Object;@566a1f71,
[Ljava.lang.Object;@41b4b4e7, [Ljava.lang.Object;@42904123,
[Ljava.lang.Object;@7b536ec3, [Ljava.lang.Object;@7d44674f,
[Ljava.lang.Object;@1933e78c, [Ljava.lang.Object;@59ea34d0,
[Ljava.lang.Object;@392f7c58, [Ljava.lang.Object;@678f1a2d,
[Ljava.lang.Object;@61868ed7, [Ljava.lang.Object;@69426a83,
[Ljava.lang.Object;@2bcd164f, [Ljava.lang.Object;@340c3f69,
[Ljava.lang.Object;@6129ef09, [Ljava.lang.Object;@1b4587dd,
[Ljava.lang.Object;@58799594, [Ljava.lang.Object;@d5b1e85,
[Ljava.lang.Object;@2324f980, [Ljava.lang.Object;@1468f956,
[Ljava.lang.Object;@290b7a]

Regards
Mark Sack



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/REST-query-to-fetch-filtered-list-of-users-and-some-of-their-attributes-tp7599550.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] REST query returns subset of results

2016-05-20 Thread Mark Sack
Created http://jira.xwiki.org/browse/XWIKI-13434



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/REST-query-returns-subset-of-results-tp7599544p7599546.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] REST query returns subset of results

2016-05-20 Thread Mark Sack
I'm using the REST API to get the wiki users as per the example in
http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI
i.e.

http:///xwiki/rest/wikis/query?q=object:XWiki.XWikiUsers

This only returns 10 of the users in the wiki database. If I make the call
using curl, it returns 10 non-hidden users. If I make the call from a
browser, it returns almost the same set of 10 users except that 2 of them
are replaced with hidden users.

I can get around this by adding the start and number parameters to the query
and then repeating the call incrementing the start parameter until nothing
is returned.

This leads to a number of questions.
1. Is there a way to adjust the default limit of 10 results other than using
the number parameter?
2. Is there a way to get the count of the total number of users using the
REST API?
3. Is there an explanation for the different behaviour between curl and the
browser? Which behaviour should I expect if making the call from another
application (eg. Rails)?
4. Is there a more elegant way to get all of the users through the API?
5. Is this documented somewhere that I've missed or would it be useful to
add a comment to the RESTful API page?
6. Niggly point regarding the REST API page. In some places, the start
parameter is labeled as 'n' and in others as 'offset'. I assume this is
perhaps an artefact of updates by different authors. Should it really be
'offset' everywhere or is the distinction intentional?

Regards
Mark



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/REST-query-returns-subset-of-results-tp7599544.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Display users that are not hidden

2016-04-07 Thread Mark Sack
Thanks for the pointer. The filter is a big improvement on what I had before.
However, it only excludes hidden users if the logged in user has not chosen
to display hidden documents. For this particular case, it would be
preferable to always exclude hidden users from the output of the script. Is
there a way to do that?

I had thought about using the 'active' property in the user profile (I'm not
sure what is its intended function within the Xwiki application). But if I
add it in for editing, then the users can set themselves as active/inactive.
In our situation, this would be exclusively an administrative function.

Regards
Mark



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Display-users-that-are-not-hidden-tp7598831p7598850.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Display users that are not hidden

2016-04-06 Thread Mark Sack
I have a script as follows that displays a list of users that meet some
criteria (the actual where clause I'm using is a bit more complicated than
shown below):

{{velocity}}
#set ($users=$services.query.xwql("FROM doc.object(XWiki.XWikiUsers) AS user
WHERE (user.first_name LIKE '%Mar%')").execute())
#set ($numUsers = $users.size())
#if ($numUsers > 0)
  #foreach ($user in $users)
#if (!$user.isHidden())
 [[$user]]
#end
  #end
#end
{{/velocity}}

My problem is that the isHidden method is filtering out the users whose
pages I've marked as hidden. How can I fix this script to list only the
users who are not hidden?

Mark



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Display-users-that-are-not-hidden-tp7598831.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Deleting admin user blocks execution of some pages

2016-04-05 Thread Mark Sack
Due to another issue, I had to recreate some users (including the one I had
been using as the administrator). Instead of just hiding the old users, I
decided to delete them. It was a mistake to delete the old admin user
because, now, scripts that were last modified by that user will not execute
(even by the new admin user). The new admin user needs make some new
modification to the script in order to execute it.

Is there a mechanism by which I could get a list of all the scripts that
were last modified by that old user so that I could go in and clean up this
problem at one go instead of one by one as I stumble onto those pages? Is
there another workaround a person can use when they shoot themselves in the
foot like this?

Note that I tried restoring the old admin user from the deleted documents.
He then appears in the user directory as expected. But the scripts will
still not execute. So it appears that restoring a user has the effect of
creating a new user with the same attributes as the old one instead of
actually recreating the old user. Could this be considered an issue (defect
or improvement) worthy of recording in JIRA?

Mark



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Deleting-admin-user-blocks-execution-of-some-pages-tp7598812.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Jasig CAS authentication and users with periods in the id

2016-03-29 Thread Mark Sack
Created   http://jira.xwiki.org/browse/AUTHCAS-1
  



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Jasig-CAS-authentication-and-users-with-periods-in-the-id-tp7598674p7598704.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Jasig CAS authentication and users with periods in the id

2016-03-29 Thread Mark Sack
My bad. I am indeed using the extension
http://extensions.xwiki.org/xwiki/bin/view/Extension/Authenticator+Jasig+CAS
  
I just assumed this extension would be the only choice for CAS
authentication. So I didn't explicitly mention it.

The CAS server has its own login page (at least in the Ruby implementation
that I am using). That server takes the ID and password entered on the login
page and passes it through to whatever service(s) (LDAP, database, etc.) it
is configured to authenticate against. The real value of CAS is that it
remembers the user's login status and doesn't ask the user to
re-authenticate if he wants to log in to to a different app but already has
a status of logged in. Since CAS is intended to handle login requests from
multiple applications, it isn't really the right place to do a mapping of
user IDs such as that required specifically by xwiki.

I'll continue to poke around for alternatives but it appears that, since my
programming skills aren't very deep, I'll need to fall back to recreating
the users.

In the long term, I can see two alternative enhancements to prevent users
from getting into this predicament:
- remove the restriction that xwiki user IDs cannot contain periods (which I
understand from previous posts is difficult and not on the list of
priorities)
- enhance the xwiki Jasig CAS extension to provide a mapping capability
similar to that of LDAPProfileClass (this would depend on the maintainer of
the extension, I suppose).

All of this is just my two cents worth. I can understand why fixing this
issue would not be a high priority since, in any system with a large number
of users, the users would not be created manually as I have done. I also
have the option of setting the system to create users when they first log
in, thus avoiding the problem when adding new users in future. (For now, I
need the database nicely populated to demonstrate its utility to the user
community and can't rely on them all logging in first.)

Thanks for your help in investigating the issue.

Regards
Mark



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Jasig-CAS-authentication-and-users-with-periods-in-the-id-tp7598674p7598696.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Jasig CAS authentication and users with periods in the id

2016-03-29 Thread Mark Sack
Thanks for the suggestion. Unfortunately, it looks like I will need a lot
more hand holding to figure out whether or not I can use the trusted ldap
authenticator as you suggest.

1. I found the following comment in xwiki.cfg
#-# Used by some authenticators (like
com.xpn.xwiki.user.impl.xwiki.AppServerTrustedAuthServiceImpl)
But I didn't find that the string anywhere else in the files in WEB-INF.
So I'm not sure if I'm using that particular
authenticator. Is it the default? How does one select a specific
authenticator?

2. In the readme for the extension
https://github.com/xwiki-contrib/xwiki-authenticator-trusted-ldap/blob/master/README.md
the configuration examples all seem to refer to authentication using
LDAP (and the name of the extension implies that
it is intended for LDAP). But in my configuration, xwiki isn't talking
to LDAP - it is instead talking to a CAS server which
in turn talks to Active Directory (using the LDAP protocol). As a
consequence, LDAP authentication is disabled in 
xwiki.cfg. Instead my xwiki.cfg file has the following line:

xwiki.authentication.authclass=org.xwiki.contrib.authentication.cas.XWikiCASAuthenticator
Is it true that this extension can be used for CAS authentication as
well as LDAP?

3. The extension appears to rely on regexp for transformation/translation of
the user ID. I inadvertently omitted one detail 
from my description of the problem. The mapping from LDAP/CAS user ID to
xwiki ID is not as simple as replacing a 
period with an underscore. Here, people sometimes have multiple surnames
or use a second given name in
to a surname. As an example, my name might be 'Mark Thomas Jones Sack'.
And in xwiki I might have created a 
user with the ID 'mark_sack'. But in Active Directory, the ID might be
'mark.thomas' or 'mark.jones'. For a mapping
such as this from 'mark.jones' to 'mark_sack', I think I would need a
separate field (like LDAPProfileClass provides)
instead of just a regexp expression.

Regards
Mark



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Jasig-CAS-authentication-and-users-with-periods-in-the-id-tp7598674p7598689.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] PostgreSQL version downgraded for 8.0?

2016-03-29 Thread Mark Sack
Thanks for the all the clarifications. My previous experience is with an
organization that was much more strict about third party support. So I tend
to attach more significance to these kinds of details than is perhaps
necessary.

Regards
Mark



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/PostgreSQL-version-downgraded-for-8-0-tp7598673p7598686.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Jasig CAS authentication and users with periods in the id

2016-03-28 Thread Mark Sack
I have successfully configured our xwiki site to use LDAP authentication
against Active Directory. The convention for the user IDs in our Active
Directory is to use a period to separate the given name and surname as in
mark.sack. I added the LDAPProfileClass object to the user profiles to map
the Active Directory IDs to the internal wiki ones. I had created the users
before implementing the Active Directory authentication with the convention
of an underscore in between the given name and the surname.

Now I would like to implement a single signon solution for all of our
applications and have set up a CAS server to authenticate against Active
Directory. The authentication works fine but the CAS authentication in xwiki
seems to simply strip out the period in the Active Directory ID instead of
mapping to the existing user. I observed the following behaviour:
- in xwiki.cfg, if I set xwiki.authentication.cas.create_user to 1 and login
as mark.sack (with my Active Directory password), the login is successful.
But xwiki creates a new user with id marksack instead of mapping to the
existing mark_sack user (mark_sack has the LDAPProfileClass set to
mark.sack).
- in xwiki.cfg, if I set xwiki.authentication.cas.create_user to 0 and login
as mark.sack, the login fails with a message that to the effect that the
user does not exist.

How could I achieve the mapping of xwiki users to Active Directory for CAS
authentication? 

Our system is relatively small (about 40 users so far) and has not yet
really been rolled out to the user community. So if need be, I could create
new xwiki users following the convention required by xwiki (no character
between the given name and surname). But I would prefr to avoid that if I
can.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Jasig-CAS-authentication-and-users-with-periods-in-the-id-tp7598674.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] PostgreSQL version downgraded for 8.0?

2016-03-28 Thread Mark Sack
I noticed that the supported version of PostgreSQL for XWiki 8.0 is 9.4.5.
But for 7.4.2 it is 9.5. Is there some significance to this, eg. there is
some function in 8.0 that was found not to work with PostgreSQL 9.5? Or is
this simply an artefact of the testing process? Is there a need to downgrade
PostgreSQL to 9.4.5 if I upgrade XWiki to 8.0?

The database support strategy page could be interpreted to indicate that all
PostgreSQL 9.x releases are supported. But I find it hard to believe that
you would be that generous (9.0 has reached its end of life milestone and
9.1 is almost there). 



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/PostgreSQL-version-downgraded-for-8-0-tp7598673.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Document tree branches not translated

2016-03-09 Thread Mark Sack
Created http://jira.xwiki.org/browse/XWIKI-13183

Just not sure if I got all the fields (priority, component) right.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Document-tree-branches-not-translated-tp7598383p7598388.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translation problems

2016-03-09 Thread Mark Sack
I've started doing that. But I could not figure out how to set multi-line
values in the translation wiki page - for example, the Sandbox test pages.
For those ones, I exported the Sandbox page in a xar file, added in the new
translation xml file, and then imported the new xar file.

Thank you for your patience in explaining all of this.

Mark Sack



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763p7598387.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Document tree branches not translated

2016-03-08 Thread Mark Sack
Does anyone know how to get the branches of the document translated? As per
the attached image, the Sandbox page is translated at the top of the tree (I
guess because I updated the title in the translation page), but not at the
branch. Other pages such as Meetings and the Calendar are translated in both
places. Also the Attachments page is not translated in the expanded tree. I
am running Xwiki 7.4.2 localized to pt_BR.
 



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Document-tree-branches-not-translated-tp7598383.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translation problems

2016-03-08 Thread Mark Sack
I have been updating the translations on the l10n site and then downloading
the resource files. My challenge is that, sometimes, I don't want to wait
for the next release. My perception is that, for extensions, the wait until
the next release can be quite long (not a surprise). Speaking in complete
ignorance of the implementation challenges, I think it would be ideal if the
translations could be updated separately from the releases.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763p7598380.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] New versions of attachments not recognized

2016-03-02 Thread Mark Sack
A colleague pointed me to the Ctrl-F5 shortcut in the browser which I guess
is what you meant by "force clear cache". That resolved the problem. I had
thought that clearing the browser history under the Privacy settings would
take care of clearing out all that data but it turns out they are different.

Thanks for your help.
Mark Sack



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/New-versions-of-attachments-not-recognized-tp7598189p7598269.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Not able to create new skin

2016-03-02 Thread Mark Sack
Yes, appending WebHome works. The browser tab isn't wide enough to display
the full name of the page (had to hover on it to see the WebHome). I'll try
to remember and watch for that in future.

Thank you for your help.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Not-able-to-create-new-skin-tp7598159p7598242.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] New versions of attachments not recognized

2016-03-01 Thread Mark Sack
I started out with my system configured to use the hibernate attachment
storage and then later converted it to file storage using the Database to
Filesystem porter in the Admin Tools extension. Initially everything
appeared to work fine. Attached images reappeared on the pages after I ran
the porter. But now I'm finding that, if I load a new version of an
attachment image, the page continues to display the old version of the image
instead of the new one. If I edit the page, delete the image and then
reinsert it, the updated version is displayed in the WYSIWYG view. But after
I Save & View the page, the old version of the image is displayed. Even if I
delete the attachment completely from the list of attachments and the page
and then reload the new version (so that the old version is no longer
listed) and add it back to the page, the old version is still displayed.

My environment is as follows:
Debian 8, Java openjdk-7-jre-headless, postgresql 9.4.6, tomcat8

The problem occurs in both my production system on 7.4.1 and a new VM
created from scratch with 7.4.2.

Note that, in order to get the porter to work, I had to replace the groovy
script with the new version provided by Caleb as per
http://xwiki.475771.n2.nabble.com/Admin-Tools-database-to-filesystem-porter-error-td7597567.html



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/New-versions-of-attachments-not-recognized-tp7598189.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Not able to create new skin

2016-02-29 Thread Mark Sack
In 7.4.1 (standalone installation) I'm trying to create a new skin using A.
and C. in http://platform.xwiki.org/xwiki/bin/view/DevGuide/Skins. I've a
couple of different variations but can't figure out what I'm doing wrong. 

The steps I followed are:

1. Login as Admin - URL is http://localhost:8080/xwiki/bin/view/Main/
2. Edit URL and go to http://localhost:8080/xwiki/bin/view/Main/MySkinPage/
3. I see that the page does not exist and follow the 'edit this page' to
create it.
4. Press the Create button and then Save & View.
5. Open the Objects editor and select the XWiki.XWikiSkins class - press Add
6. In the object properties, set the Name to 'My New Skin'
7. Set the base skin to 'flamingo' - Press Save & View.
8. Select the Test this skin link and everything looks fine.
9. Go to Administer Wiki -> Presentation.
10. Set both the Stylesheet and Stylesheets fields to Main.MySkinPage
11. Set the Skin field to 'My New Skin' and press Save.
12. This results in a Java error 
...
Caused by: java.net.URISyntaxException: Illegal character in path at index
9: /skins/My New Skin/admin.vm
...

I thought maybe the error was that spaces were not allowed. So I created a
new instance and followed the same steps but in steps 6 and 11 used
'MyNewSkin'. Then the browser showed the following:
Error
You are not allowed to view this page or perform this action.
The URL was
http://localhost:8080/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin§ion=Presentation&space=XWiki

I also thought that maybe in step 11 I need to use Main.MySkinPage instead.
This resulted in the same error, i.e.
Error
You are not allowed to view this page or perform this action.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Not-able-to-create-new-skin-tp7598159.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Deleting Admin user causes document tree to not load

2016-02-24 Thread Mark Sack
I'm not sure if this is of more than academic interest since the alternative
of hiding the page works for me and, as per Thomas' comment, deleting Admin
apparently has some severe consequences. In any event, I think the behaviour
is specific to Postgres and not my environment as I reproduced it by
creating a new VM from scratch.

Here is the error message in catalina.out as per below. I've also included
below the output of the javascript console.

INFORMAÇÕES: Server startup in 51391 ms
2016-02-24 09:48:32,197 [XWiki initialization] INFO 
.HibernateDataMigrationManager - Storage schema updates and data migrations
are enabled 
2016-02-24 09:48:32,455 [XWiki initialization] INFO 
.HibernateDataMigrationManager - No data migration to apply for wiki [xwiki]
currently in version [73000] 
2016-02-24 09:48:32,456 [XWiki initialization] INFO 
.HibernateDataMigrationManager - Checking Hibernate mapping and updating
schema if needed for wiki [xwiki] 
2016-02-24 09:48:40,801 [XWiki initialization] INFO 
.a.DefaultAuthorizationManager - [programming] access has been denied for
user [xwiki:XWiki.Admin] on [Public]: security checkpoint 
2016-02-24 09:48:40,871 [XWiki initialization] ERROR
cumentTranslationBundleFactory - Failed to register translation bundle from
document [xwiki:WikiManager.Translations] 
org.xwiki.security.authorization.AccessDeniedException: Access denied when
checking [programming] access to [Main Wiki] for user [xwiki:XWiki.Admin]
at
org.xwiki.security.authorization.DefaultAuthorizationManager.checkAccess(DefaultAuthorizationManager.java:94)
~[DefaultAuthorizationManager.class:na]
at
org.xwiki.localization.wiki.internal.DocumentTranslationBundleFactory.checkRegistrationAuthorization(DocumentTranslationBundleFactory.java:439)
[DocumentTranslationBundleFactory.class:na]
at
org.xwiki.localization.wiki.internal.DocumentTranslationBundleFactory.registerTranslationBundle(DocumentTranslationBundleFactory.java:418)
[DocumentTranslationBundleFactory.class:na]
at
org.xwiki.localization.wiki.internal.DocumentTranslationBundleFactory.loadTranslations(DocumentTranslationBundleFactory.java:233)
[DocumentTranslationBundleFactory.class:na]
at
org.xwiki.localization.wiki.internal.DocumentTranslationBundleFactory.initialize(DocumentTranslationBundleFactory.java:207)
[DocumentTranslationBundleFactory.class:na]
at
org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
[InitializableLifecycleHandler.class:na]
at
org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:322)
[EmbeddableComponentManager.class:na]
at
org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:424)
[EmbeddableComponentManager.class:na]
at
org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:392)
[EmbeddableComponentManager.class:na]
at
org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:190)
[EmbeddableComponentManager.class:na]
at
org.xwiki.component.embed.GenericProvider.getInstance(GenericProvider.java:111)
[GenericProvider.class:na]
at 
org.xwiki.component.embed.GenericProvider.get(GenericProvider.java:100)
[GenericProvider.class:na]
at
org.xwiki.localization.wiki.internal.DocumentTranslationBundleInitializer.onEvent(DocumentTranslationBundleInitializer.java:82)
[DocumentTranslationBundleInitializer.class:na]
at
org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:304)
[DefaultObservationManager.class:na]
at
org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:269)
[DefaultObservationManager.class:na]
at
com.xpn.xwiki.internal.XWikiInitializerJob.runInternal(XWikiInitializerJob.java:129)
[XWikiInitializerJob.class:na]
at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:205)
[AbstractJob.class:na]
at org.xwiki.job.AbstractJob.run(AbstractJob.java:188)
[AbstractJob.class:na]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_95]
2016-02-24 09:48:41,040 [XWiki Solr index job thread] INFO 
o.x.s.s.i.j.IndexerJob - Starting job of type [solr.indexer] with
identifier [[solr, indexer]] 
2016-02-24 09:48:43,529 [Active Installs Ping Thread] WARN 
a.i.c.ActiveInstallsPingThread - Failed to send Active Installation ping to
[http://extensions.xwiki.org/activeinstalls]. Error =
[SocketTimeoutException: Read timed out]. Will retry in [86400] seconds... 
2016-02-24 09:48:50,496 [XWiki Solr index job thread] INFO 
o.x.s.s.i.j.IndexerJob - 262 documents added, 261 deleted and 0
updated during the synchronization of the Solr index. 
2016-02-24 09:48:50,496 [XWiki Solr index job thread] INFO 
o.x.s.s.i.j.IndexerJob - Finished job of type [solr.indexer] with
identi

Re: [xwiki-users] Deleting Admin user causes document tree to not load

2016-02-23 Thread Mark Sack
A satisfactory alternative for our situation would be to hide the Admin user
from all but users in the Admin group. That is a feature that I can see
coming in handy for other scenarios as well (for example, someone leaves the
organization but for some reason we don't want to remove them from the user
directory). I would envision adding a 'Hide' flag or an 'Expiry Date' field
to the user profile to determine whether or not the user should be
displayed.

Does anyone have an idea as to how this could be accomplished?

A complementary feature of course would be to prevent the hidden user from
logging in. In our case, we are using Active Directory authentication so we
can take care of that outside of the xwiki software.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Deleting-Admin-user-causes-document-tree-to-not-load-tp7598099p7598102.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Deleting Admin user causes document tree to not load

2016-02-23 Thread Mark Sack
My understanding is that I should be able to replace the Admin user with
another user that I've created and added to the Admin group. But when I
delete the Admin user using the other user in the Admin group, I find that
the document tree no longer loads.

My configuration is as follows:
XWiki Enterprise WAR 7.4.1
Debian Jessie
Java openjdk-7-jre-headless
Tomcat 8
Postgresql 9.4/9.5 - The release notes state that 9.5 is the supported
version for 7.4.1 but I could not find a 9.5 JDBC  driver so I tried it with
both 9.4 and 9.5 versions of Postgresql (in both cases using the 9.4 JDBC
driver).

This might be related to XWIKI-13025 'The document tree doesn't load on
Postgres' since the problem does not seem to occur with the standalone
installation.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Deleting-Admin-user-causes-document-tree-to-not-load-tp7598099.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Convert existing xwiki instance to Active Directory authentication

2016-02-18 Thread Mark Sack
I have an existing instance of xwiki with some users and would like to
convert it to authenticate against an Active Directory server. I tried
setting up a new test instance of xwiki in a VM and was able to get it to
authenticate against AD. But in the test, the user directory was empty
(except for Admin) - so it created a new user at login. I'd appreciate some
help on the next step of configuring the system so that an existing xwiki
user authenticates against an existing AD entry.

I configured the test system as follows:

xwiki.authentication.authclass=com.xpn.xwiki.user.impl.LDAP.XWikiLDAPAuthServiceImpl
xwiki.authentication.ldap=1
xwiki.authentication.ldap.server=servername
xwiki.authentication.ldap.port=389
xwiki.authentication.ldap.bind_DN=subdomain\\{0}
xwiki.authentication.ldap.bind_pass={1}
xwiki.authentication.ldap.base_DN=DC=subdomain,DC=domain
xwiki.authentication.ldap.UID_attr=sAMAccountName
xwiki.authentication.ldap.group_classes=group,groupOfNames,groupOfUniqueNames,dynamicGroup,dynamicGroupAux,groupWiseDistributionList
xwiki.authentication.ldap.fields_mapping=name=sAMAccountName,last_name=sn,first_name=givenName,fullname=displayName,email=mail,ldap_dn=dn
xwiki.authentication.ldap.update_user=1 
xwiki.authentication.ldap.trylocal=0

Other details that may or may not be relevant:
- the AD login IDs contain periods which are not allowed in the xwiki names.
For the xwiki users that already exist, the login names are the same as
those in AD except that the period is replaced by an underscore
- there are xwiki 'users' with no corresponding entry in AD. Those xwiki
entries should not be allowed to login.
- the exception to the above point is the Admin user. If I add one of the
users with a corresponding AD entry to the Admin group, would that user be
able to do everything that the Admin user can do?

A nice to have would be to also bring the AD groupings/organizational units
across to xwiki. Is their an easy way to do this?



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Convert-existing-xwiki-instance-to-Active-Directory-authentication-tp7598029.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Mocca Calendar and Meeting Calendar have different first days

2016-02-12 Thread Mark Sack
I figured it out I think. I navigated to xwiki/bin/view/Meeting/calendarView
(as Admin) and edited it using the wiki editor.

In the macro, I changed the following line

{{calendar classname="Meeting.MeetingClass" startfield="startDate"
durationfield="duration" defaultView="agendaWeek" firstHour="8" minTime="8"
maxTime="21" language="fr" editable="true" timeFormat="HH:mm" /}}

to add a parameter firstDay="0"




--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Mocca-Calendar-and-Meeting-Calendar-have-different-first-days-tp7597963p7597968.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Mocca Calendar and Meeting Calendar have different first days

2016-02-12 Thread Mark Sack
Unfortunately, the default for Mocca Calendar is Sunday which is what I want.
I need to change the Meeting Application. The Meeting Application doesn't
seem to have a 'firstDayOfWeek' (or similar) translation key. So it seems
like I need to go a bit deeper to make the change.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Mocca-Calendar-and-Meeting-Calendar-have-different-first-days-tp7597963p7597966.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Mocca Calendar and Meeting Calendar have different first days

2016-02-12 Thread Mark Sack
In the 7.4 release, the Mocca Calendar extension and the calendar view of the
Meeting Application extension use different first days of the week. I'd like
to have our site consistently use the same first day (Sunday). Can anyone
give me a pointer on how to do this?



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Mocca-Calendar-and-Meeting-Calendar-have-different-first-days-tp7597963.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translation problems

2016-02-05 Thread Mark Sack
What is the easiest/standar process for incorporating new translation
resource files from the translation site before the next release of the core
or an extension? So far I've been downloading the source for the extension,
adding in or replacing the translation resource file downloaded from the
translation site, rebuilding the extension and importing the xar file. For
the core resources, I replaced the resources file in the jar.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763p7597804.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translation problems

2016-02-05 Thread Mark Sack
The workaround you suggested didn't have any effect. To analyse the problem a
bit further (and verify that I was creating the translation page correctly),
I inserted a spelling error in the Translations page. The spelling error was
displayed as expected if I deployed the app to a path other than ROOT. But
in ROOT that translation page is still not used. Maybe this one is a
candidate for Ripley's Believe It or Not.

I did all of the new translations via the 
http://l10n.xwiki.org/xwiki/bin/view/L10N/
   site (logging in there and
making the edits on the forms). Then I downloaded the Application Resource
file. Do I still need to do a github pull request or send you the files?

I corrected one spelling error in the core resources before the 7.4 release
and noticed that the correction was automatically included in 7.4. I guess
the core is built using a different process than the extensions.

Regards
Mark



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763p7597793.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translation problems

2016-02-03 Thread Mark Sack
I tried the search on "platform.livetable.paginationResults*" with xwiki
installed both in tomcat8/webapps/xwiki and in tomcat8/xwiki/ROOT. In both
cases, there was no result (or Nenhum resultado in Portuguese).

On the installed extensions page, it shows the following that I've installed
explicitly:
Mocca Calendar Application
Meeting Application
Admin Tools Application
XWiki Enterprise Flavor - Main Wiki

All of the other ones listed were installed as dependencies. There are a
couple of extensions that don't have pt_BR localization (such as Meeting and
Full Calendar). For those cases, I downloaded the source files, added in the
pt_BR resources file, rebuilt the extension and imported the resulting xar
file. 



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763p7597772.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translation problems

2016-02-03 Thread Mark Sack
For the second problem, I discovered something that I can't quite understand
(perhaps because I am relatively new to this kind of development).
My setup is debian 8, openjdk 7, tomcat8, postgresql 9.4 (all installed from
the debian repositories).

The problem occurs when I have the xwiki application installed in
tomcat8/webapps/ROOT. I did this by first installing it in
tomcat8/webapps/xwiki, deleting the existing ROOT directory and then moving
the xwiki directory to ROOT. If I move the ROOT directory back to xwiki, the
problem goes away.

Note other phrases (including ones in the core resources translation file)
are being localized correctly.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763p7597771.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Translation problems

2016-02-03 Thread Mark Sack
For the first problem, I tried setting the locale to pt and found that the
month does get translated to Portuguese. So it may be that this is a
consequence of  http://jira.xwiki.org/browse/XWIKI-10083
  . But if I append
?language=pt_BR to the URL, the month still shows up in English.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763p7597767.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users



[xwiki-users] Translation problems

2016-02-02 Thread Mark Sack
I'm setting up a XWiki 7.4 site with a pt_BR localization and am updating
empty translations as I go along according to our use cases. In the process
I've run into a couple of problems.

Firstly, on the Blog Archive panel, the months are being displayed in
English. If I log into l10.xwiki.org and do a search for existing
translation keys like the following:
Original text: January
Language: pt_BR
Status: Not dead
Other fields all blank
the result returned has two keys, both of which are translated.
How can I do the translation for the months in the blog panel? Note that if
I switch the localization to another language such as fr, I see that the
months are translated properly.

Secondly, on the live tables on my soon to be production instance, the range
phrase at the top of the live tables (such as the User Index) is showing up
half English/half Portuguese as 'Results 1-10 out of 40 por página de 10'.
If I switch the language to fr, the problem remains with the phrase showing
up as 'Results 1-10 out of 40 par page de 10'. But if I set up a clean
instance of XWiki, I see that the phrases are translated properly for both
pt_BR and fr. Clearly, I've been futzing with something(s) that I should not
have touched. Can anyone give me some pointers on how to diagnose the
problem and restore the system to its proper behaviour? 



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Translation-problems-tp7597763.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Custom display for computed field which is list of users

2016-01-26 Thread Mark Sack
In 7.4, I've created an app within minutes. One of the properties in the app
is a computed field that returns a list of users that meet some specific
criteria. If I leave the custom display field for the property blank, the
contents are displayed as follows:

[XWiki.john_smith, XWiki.mark_sack]

What I would really like to do is display them as hyperlinks to the
corresponding user page. I thought that I could use a script in the custom
display field to accomplish this. Reading the following note
http://www.xwiki.org/xwiki/bin/view/FAQ/Which+variables+I+can+use+in+%22Custom+Display%22+field
there are some variables available. It looks like the $value variable should
contain the computed list of users. But if I put a script like the following
into the custom display field:

{{velocity}}
$name
$prefix
$object
$type
$value
{{/velocity}}

the result is as follows

Usuarios
Secti.Admin.Setores.Code.SetoresClass_0_
com.xpn.xwiki.api.Object@543f3466
view
$value

The first four values are correct as far as I can tell. But the $value
variable does not appear to be populated. Does anyone have a suggestion as
to how I can achieve my desired result with the hyperlinks?



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Custom-display-for-computed-field-which-is-list-of-users-tp7597697.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Problems setting up multilingual site

2016-01-26 Thread Mark Sack
I understand this better now. 

Another question related to the blog feature. In the current pt_BR
localization, the months under the archive blog panel are still in English
although the titles, etc. of the blog panels are in Portuguese. I was able
to update the pt_BR localization for some of the other apps (eg. full
calendar) but haven't figured out where to do this for the months on the
blog panel. I did a search on the translations web site but didn't find
anything that worked for this case. Can you point me in the right direction?



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Problems-setting-up-multilingual-site-tp7597630p7597696.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Problems setting up multilingual site

2016-01-25 Thread Mark Sack
Yes, I can switch back and forth between the different languages using the
URL method. 

However, this functionality seems to be exhibiting some strange and
inconsistent behaviour. This time I created a new instance in a VM and
observed the following:

1. Logged in as Admin and set the Multilingual - Yes, Supported languages -
pt_BR,en and Default language - pt_BR
2. Saved the configuration with the result that the page was displayed in
French (I did not list fr as a supported language).
3. Tried switching between different languages (pt_BR, en and fr) and they
all were displayed as expected.

The languages shown on the side are English and French as in the attached
image.  

Another thing I noted is it appears that the list of supported languages
cannot contain spaces. If I put a space after the comma, there is an error
in catalina.out.

Also I don't quite understand is how to edit a page for a specific language
only. If I go to the first blog post page with language pt_BR and make some
edits, those same edits show up if I display the page with language en. I
read the Internationalization page 
http://http://platform.xwiki.org/xwiki/bin/view/Features/I18N
   But I
can't see a "Document Information" panel as it describes. The last item on
the ... drop down menu gives some information about the page but does not
say anything about the language.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Problems-setting-up-multilingual-site-tp7597630p7597692.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Problems setting up multilingual site

2016-01-20 Thread Mark Sack
With XWiki 7.4 I have a site setup in Brazilian Portuguese (pt_BR). I edited
the localization settings as follows:
Multilingual - Yes
Supported languages - pt_BR, en
Default language - pt_BR

After saving the settings, the site looks like it switches to the pt local
(European Portuguese?). I can tell this because the pt local is much more
sparsely translated. On the drop down menu on the right, I now see a
Languages item with Portuguese and English options and selecting English
switches the site to English.

I go back to the drop down menu and select languages. But now I only see
English - Portuguese is not listed as an available language.

I tried to repeat the above with a fresh install. This time I first set the
local to pt (no multilingual support) and verified that the site is switch
to pt. Then I set the multilingual support to yes and added the en local (pt
still the default). Now the site switches immediately to English and the
only language available on the drop down menu on the right is English.

I'd appreciate some help in setting up my site for multilingual support with
both English and Brazilian Portuguese. Is there something I'm doing wrong? 



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Problems-setting-up-multilingual-site-tp7597630.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Mocca calendar - display 'short description' instead of title in month/week/day view

2016-01-20 Thread Mark Sack
You're right - I missed a step. After step 8 I edited the event class with
the wiki editor. The Test field appeared on the form in the editor without
me having to do anything explicitly. I selected Save&View with the Update
Class Template, Update Class Sheet, and Update Class Translation Bundle
options checked.

And running through the steps again, I confirmed that the Test field does
not appear on the form before I do the wiki edit.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Mocca-calendar-display-short-description-instead-of-title-in-month-week-day-view-tp7597592p7597624.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Mocca calendar - display 'short description' instead of title in month/week/day view

2016-01-19 Thread Mark Sack
Clemens,
Your suggestion gets me part of the way there but still having some problems
(in steps 11 and 12 below). I thought maybe my earlier futzing around trying
to get it working on my own screwed things up. So I created a clean instance
on a VM and made the mods you suggested. Here are the steps I followed and
the results.

1. Created new XWiki 7.4 instance - distribution wizard doesn't start for
some reason so I installed the default pages using
xwiki-enterprise-ui-mainwiki-all-7.4.xar.
2. Installed MoccaCalendar extension and verified that version is 2.5 (full
calendar macro is version 2.0.2)
3. Logged in as Admin and created a new calendar (first to verify behaviour
without your suggested mods to JSON Service).
4. In the new calendar created an event - event is displayed as expected.
5. In the new calendar, tried to create another event with the same title -
event form displays 'An event with this name already exists.' under the
title field.
6. In the new calendar, tried to create another event with no title - event
form displays 'Title field is required'.
7. Deleted event created in step 4.
8. In class editor MoccaCalendarEvent class added new field 'Test' of type
String.
9. Navigated to /xwiki/bin/view/MoccaCalendar/JSONService -> Edit -> Source
and replaced $itemdoc.getPlainTitle() with $itemdoc.getValue('Test') in two
places as you suggested.
10. Returned to new calendar created in Step 3.
11. Invoked form to create an event - event form is displayed with new Test
field (blank). But the Title field is populated with a random string and the
Calendar drop down field where you can select which calendar the event
belongs to is missing from the form.
12. Entered a value in the Test field and saved the event - the form
disappears but the event is not displayed on the new calendar.
13. Navigated to Calendar Overview and observed that new event is displayed
there with the content of the Test field instead of the Title. Here the
event is displayed on the Month view the way I want it.




--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Mocca-calendar-display-short-description-instead-of-title-in-month-week-day-view-tp7597592p7597610.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Mocca calendar - display 'short description' instead of title in month/week/day view

2016-01-18 Thread Mark Sack
In our use of the calendar extension, I expect to have situations where the
title is repeated (sometimes for what are really recurring events and
sometimes not). For this reason, we'll leave the randomly generated string
in the title field. I've added a 'short description' field to the event
class to use in place of the title. I would like to display the new field in
the calendar month/week/day view instead of the title. Does anyone have
suggestions on how to do this?

I'm using XWiki 7.4.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Mocca-calendar-display-short-description-instead-of-title-in-month-week-day-view-tp7597592.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Admin Tools database to filesystem porter error

2016-01-18 Thread Mark Sack
Solved
Thank you



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Admin-Tools-database-to-filesystem-porter-error-tp7597567p7597590.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Admin Tools database to filesystem porter error

2016-01-15 Thread Mark Sack
When I try to execute the database to filesystem porter tool in xwiki 7.4, I
see the following error:

  Failed to execute the [groovy] macro. Click on this message
for details.

Can anyone suggest how to resolve or work around this problem? 
My environment is Debian jessie, Postgresql 9.4, WAR file running on tomcat8
and openjdk-7

The details are below.

org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate Script
Macro for content [import com.xpn.xwiki.doc.XWikiAttachment;
import com.xpn.xwiki.doc.XWikiDocument;
import com.xpn.xwiki.doc.DeletedAttachment;
import org.xwiki.store.legacy.doc.internal.ListAttachmentArchive;
import com.xpn.xwiki.store.XWikiAttachmentStoreInterface;
import org.xwiki.store.legacy.store.internal.FilesystemAttachmentStore;
import com.xpn.xwiki.store.AttachmentVersioningStore;
import org.xwiki.store.legacy.store.internal.XWikiHibernateTransaction;
import com.xpn.xwiki.store.AttachmentRecycleBinStore;
import com.xpn.xwiki.web.Utils;
import com.xpn.xwiki.XWikiContext;
import com.xpn.xwiki.XWiki;
import com.xpn.xwiki.XWikiException;
import org.xwiki.store.filesystem.internal.FilesystemStoreTools;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.hibernate.ObjectNotFoundException;

private void printIntro(final XWiki wiki)
{
println("= Filesystem attachment storage porting script =");

println("== Step 1: Switch to Filesystem attachments. ==");

boolean ret = isFilesystemStore(wiki.getAttachmentStore()) \
&& isFilesystemStore(wiki.getAttachmentVersioningStore()) \
&& isFilesystemStore(wiki.getAttachmentRecycleBinStore());

println(getStoreLine(isFilesystemStore(wiki.getAttachmentStore()),
 wiki.getAttachmentStore()));
   
println(getStoreLine(isFilesystemStore(wiki.getAttachmentVersioningStore()),
 wiki.getAttachmentVersioningStore()));
   
println(getStoreLine(isFilesystemStore(wiki.getAttachmentRecycleBinStore()),
 wiki.getAttachmentRecycleBinStore()));

if (!ret) {
println("Please edit your xwiki.cfg file by modifying "
+ "the attachment store lines to read as follows:");
println("xwiki.store.attachment.hint = file");
println("xwiki.store.attachment.versioning.hint = file");
println("xwiki.store.attachment.recyclebin.hint = file");
println("Also make sure they are not commented out.");
}

println("== Step 2: Add this directory to your backup routine. ==");
println("This is your storage directory, "
+ "when filesystem attachments are enabled you have to back this up
"
+ "as part of your data backup routine.\n");
   
println(Utils.getComponent(FilesystemStoreTools.class).storageDir.getAbsolutePath());

println("== Step 3: Copy attachments from database to filesystem. ==");
println("Now you are ready to copy the data over from your database to
the filesystem. "
+ "It is prudent to leave the attachments in the database since this
is still experimental "
+ "and in most situations the attachment data is not bothersome just
sitting in the "
+ "database. As such, this script contains no facility to delete
entries from the database.");
println("If anything goes wrong in this function, it will fail with an
error message, "
+ "you should get the stack trace (probably in the log file) and
keep it to "
+ "confuse and humiliate the developers with. No harm should be done
since this only loads "
+ "from the database and only saves to the filesystem.");
}

main();
private void main()
{
final XWikiContext xc = xcontext.getContext();
final XWiki wiki = xc.getWiki();

int startAt = 0;
int seconds = 20;
boolean dryRun = true;
boolean verbose = false;
boolean go = request.getMethod().equals("POST") &&
request.getParameter("doIt") != null;
boolean ajax = "plain".equals(request.getParameter("xpage"));
int endedAt = 0;

if (!ajax) {
this.printIntro(wiki);
}

if (go) {
startAt = Integer.parseInt(request.getParameter("startAt"));
seconds = Integer.parseInt(request.getParameter("seconds"));
dryRun = "on".equals(request.getParameter("dryRun"));
verbose = "on".equals(request.getParameter("verbose"));
endedAt = this.doIt(startAt, seconds, dryRun, verbose, ajax);
if (ajax) {
if (endedAt == -1) {
this.printFooter();
} else {
println("\n{{html clean=false}}{{/html}}");
}
return;
}
}

this.printJs();

if (!go || endedAt > startAt) {
println("\n{{html clean=false}}");
println("");
println("");
println("");
println("");
println("");
println("Dry Run, don't save any
files.");
println("");

println("Verbose, show every
attachment.");
println("");