Attachments Macro not showing

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Attachments Macro not showing

Hamster
All,

I have added the Attachments Macro to one of our pages, and it shows all the attachments :-)

But for another user, the table is empty.

Does a user need Programming Rights to use the Attachments Macro?
Reply | Threaded
Open this post in threaded view
|

Re: Attachments Macro not showing

Hamster
I am still trying to get the Attachments Macro to work...

What I see at the Main.Attachments page of our XWiki is code (displayed as regular text)...

{
"totalrows" : $totalRows,
"matchingtags" : {},
"tags" : [],
"returnedrows" : 10,
"offset" : 1,
"reqNo" : 0,
"rows" : [
{
"name" : "$escapetool.javascript($attachName)",
"name_url" : "$aDoc.getAttachmentURL($attachName)",
"type" : "Attachment ",
"size" : "${Msz}Mb",
"author" : " ",
"author_url" : "$xwiki.getURL($attach.author)",
"date" : ""
}
, {
"name" : "$escapetool.javascript($attachName)",
"name_url" : "$aDoc.getAttachmentURL($attachName)",
"type" : "Attachment ",
"size" : "${Msz}Mb",
"author" : " ",
"author_url" : "$xwiki.getURL($attach.author)",
"date" : ""
}
, {
"name" : "$escapetool.javascript($attachName)",
"name_url" : "$aDoc.getAttachmentURL($attachName)",
"type" : "Attachment ",
"size" : "${Msz}Mb",
"author" : " ",
"author_url" : "$xwiki.getURL($attach.author)",
"date" : ""
}
, {
"name" : "$escapetool.javascript($attachName)",
"name_url" : "$aDoc.getAttachmentURL($attachName)",
"type" : "Attachment ",
"size" : "${Msz}Mb",
"author" : " ",
"author_url" : "$xwiki.getURL($attach.author)",
"date" : ""
}
, {
"name" : "$escapetool.javascript($attachName)",
"name_url" : "$aDoc.getAttachmentURL($attachName)",
"type" : "Attachment ",
"size" : "${Msz}Mb",
"author" : " ",
"author_url" : "$xwiki.getURL($attach.author)",
"date" : ""
}
, {
"name" : "$escapetool.javascript($attachName)",
"name_url" : "$aDoc.getAttachmentURL($attachName)",
"type" : "Attachment ",
"size" : "${Msz}Mb",
"author" : " ",
"author_url" : "$xwiki.getURL($attach.author)",
"date" : ""
}
, {
"name" : "$escapetool.javascript($attachName)",
"name_url" : "$aDoc.getAttachmentURL($attachName)",
"type" : "Attachment ",
"size" : "${Msz}Mb",
"author" : " ",
"author_url" : "$xwiki.getURL($attach.author)",
"date" : ""
}
, {
"name" : "$escapetool.javascript($attachName)",
"name_url" : "$aDoc.getAttachmentURL($attachName)",
"type" : "Attachment ",
"size" : "${Msz}Mb",
"author" : " ",
"author_url" : "$xwiki.getURL($attach.author)",
"date" : ""
}
, {
"name" : "$escapetool.javascript($attachName)",
"name_url" : "$aDoc.getAttachmentURL($attachName)",
"type" : "Attachment ",
"size" : "${Msz}Mb",
"author" : " ",
"author_url" : "$xwiki.getURL($attach.author)",
"date" : ""
}
, {
"name" : "$escapetool.javascript($attachName)",
"name_url" : "$aDoc.getAttachmentURL($attachName)",
"type" : "Attachment ",
"size" : "${Msz}Mb",
"author" : " ",
"author_url" : "$xwiki.getURL($attach.author)",
"date" : ""
}
, {
"name" : "$escapetool.javascript($attachName)",
"name_url" : "$aDoc.getAttachmentURL($attachName)",
"type" : "Attachment ",
"size" : "${Msz}Mb",
"author" : " ",
"author_url" : "$xwiki.getURL($attach.author)",
"date" : ""
}
]
}

...which comes from the last piece of Velocity code on that page.

Not sure what that's doing...

Problem still is: I can see the Attachments Macro working, but others can't :-(
Reply | Threaded
Open this post in threaded view
|

Re: Attachments Macro not showing

Hamster
Ok, this is getting stranger by the minute...

I can only see the attachments in the Attachments Macro when I am sitting behind my own computer. If I log onto XWiki on a different computer, I also can't see any attachments in the Attachments Macro.

WTF is going on? :-)
Reply | Threaded
Open this post in threaded view
|

Re: Attachments Macro not showing

rrodriguezIDIS
Are your attachments stored in the database or in the file system of the server?

Database Attachment Store is the default, but perhaps anybody has change this setting! It is the only setting I can figure out could cause, in any way, this behaviour...

HTH!

Ricardo

________________________________________
From: [hidden email] [[hidden email]] On Behalf Of Hamster [[hidden email]]
Sent: 24 May 2013 13:01
To: [hidden email]
Subject: Re: [xwiki-users] Attachments Macro not showing

Ok, this is getting stranger by the minute...

I can only see the attachments in the Attachments Macro when I am sitting
behind my own computer. If I log onto XWiki on a different computer, I also
can't see any attachments in the Attachments Macro.

WTF is going on? :-)



--
View this message in context: http://xwiki.475771.n2.nabble.com/Attachments-Macro-not-showing-tp7585339p7585370.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users

Nota: A información contida nesta mensaxe e os seus posibles documentos adxuntos é privada e confidencial e está dirixida únicamente ó seu destinatario/a. Se vostede non é o/a destinatario/a orixinal desta mensaxe, por favor elimínea. A distribución ou copia desta mensaxe non está autorizada.

Nota: La información contenida en este mensaje y sus posibles documentos adjuntos es privada y confidencial y está dirigida únicamente a su destinatario/a. Si usted no es el/la destinatario/a original de este mensaje, por favor elimínelo. La distribución o copia de este mensaje no está autorizada.

See more languages: http://www.sergas.es/aviso_confidencialidad.htm
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
--
Ricardo Rodríguez
Research Management and Promotion Technician
Technical Secretariat
Health Research Institute of Santiago de Compostela (IDIS)
http://www.idisantiago.es
Reply | Threaded
Open this post in threaded view
|

Re: Attachments Macro not showing

Hamster
???

The macro is working for me, but only when I view the page from "my" pc.
If I log into XWiki on a different PC, the macro does not work...
Reply | Threaded
Open this post in threaded view
|

Re: Attachments Macro not showing

Hamster
There are more funny things happening to that macro...

For example (this is a minor bug)
Filtering does not work correctly when attachments which start with a capital letter (uppercase)

Steps to reproduce:
1) Attach multiple items to a page, some with capital letter, some with lowercase letters
2) Try to filter the table and start the filter with a capital letter from one of the attachments --> the filter will not work

The fact that the macro is only working for me from my pc is a bigger issue! :-)
If I use a different PC, the macro is not showing me any attachments (no matter which user is logged in)
If I use my PC and log into the Wiki as a different user, the macro is working as expected.

So the macro seems to work only when viewed from my PC...
Reply | Threaded
Open this post in threaded view
|

Re: Attachments Macro not showing

Hamster
Does anyone have a clue what is going on with the Attachments Macro?

My users are wanting this ability, but it's not working :-(
Reply | Threaded
Open this post in threaded view
|

Re: Attachments Macro not showing

Hamster
One step closer...

Does anyone know if this extension has a compatibility issue with Internet Explorer?

I have IE and Chrome installed on my computer, and the Attachments Macro works on both on them.
My collegues only have IE installed, and the Attachments Macro does not work (doesn't show the attachments in the Livetable, the Livetable is just empty)
Our ICT-guy has also both IE and Chrome, he can see the Attachments Macro working in Chrome, but not in IE.

Any clues???
Reply | Threaded
Open this post in threaded view
|

Re: Attachments Macro not showing

Hamster
And another step closer...

As said before, the Attachments Macro does not work on Internet Explorer.
But if I open the "Developer Tools" with F12 and then refresh the page, the Attachments Macro suddenly works!!!

Why on earth do I have to open the Developer Tools (F12) in order to make the Attachments Macro work?
Reply | Threaded
Open this post in threaded view
|

Re: Attachments Macro not showing

Hamster
Is there any way to get in contact with Raluca Stavro?

Or can she visit/join this thread to take a look at the problems we are facing?
Reply | Threaded
Open this post in threaded view
|

Re: Attachments Macro not showing

Marius Dumitru Florea
Edit Main.Attachments and remove the second object of type
XWiki.JavaScriptExtension (the one that overwrites livetable.js). I'll
publish a new version of the extension.

Hope this helps,
Marius

On Tue, Jun 4, 2013 at 8:35 AM, Hamster <[hidden email]> wrote:

> Is there any way to get in contact with Raluca Stavro?
>
> Or can she visit/join this thread to take a look at the problems we are
> facing?
>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/Attachments-Macro-not-showing-tp7585339p7585558.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Attachments Macro not showing

Hamster
Hi Marius,

I noticed that you uploaded a V3 of the Attachments Macro, so I checked it out!

Sadly, I still can't filter on the "name" if the filter starts with a capital

Steps to reproduce:
-Upload an attachment which name starts with a capital letter (uppercase)
-Try to filter the table on the "name"

The table will not apply a correct filter :-(
Reply | Threaded
Open this post in threaded view
|

Re: Attachments Macro not showing

Marius Dumitru Florea
On Wed, Jun 5, 2013 at 3:21 PM, Hamster <[hidden email]> wrote:
> Hi Marius,
>
> I noticed that you uploaded a V3 of the Attachments Macro, so I checked it
> out!

You're welcome.

>
> Sadly, I still can't filter on the "name" if the filter starts with a
> capital
>
> Steps to reproduce:
> -Upload an attachment which name starts with a capital letter (uppercase)
> -Try to filter the table on the "name"
>

> The table will not apply a correct filter :-(

Contributions are always welcomed.

Thanks,
Marius

>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/Attachments-Macro-not-showing-tp7585339p7585585.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Attachments Macro not showing

Hamster
Marius,

I have tried to "debug" this thing by editing the  velocity code of the LiveTableResultsMacros.

On that page, "upper(...)" and ".toUpperCase()" are being used at "random" places in the code.

I have tried to add "upp(...)" at several locations in the code, but no positive results (filtering of the LiveTable is still incorrect).

Can somebody please confirm if this bug is present in their XWiki too?
Reply | Threaded
Open this post in threaded view
|

Re: Attachments Macro not showing

Hamster
Another possible cause for the filter to "fail" could be the Regular Expression used on that page...

.replaceAll('[^a-zA-Z0-9_.]','')

I am not an expert, but I have a gut feeling there's something fishy about those RegEx's
Reply | Threaded
Open this post in threaded view
|

Re: Attachments Macro not showing

Marius Dumitru Florea
In reply to this post by Hamster
On Thu, Jun 6, 2013 at 11:56 AM, Hamster <[hidden email]> wrote:
> Marius,
>

> I have tried to "debug" this thing by editing the  velocity code of the
> LiveTableResultsMacros.

Why LiveTableResultsMacros? Did you look over the code of the
Attachments macro? It's a wiki macro so you should probably first
understand how wiki macros are defined
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial .
Then, if you read the live table macro documentation
http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro ,
especially the parameters section, you'll understand that Attachments
macro uses a custom live table results page. Next you have to find the
place where attachments are filtered by name in this custom results
page and make sure it's case insensitive.

Hope this helps,
Marius

>
> On that page, "upper(...)" and ".toUpperCase()" are being used at "random"
> places in the code.
>
> I have tried to add "upp(...)" at several locations in the code, but no
> positive results (filtering of the LiveTable is still incorrect).
>
> Can somebody please confirm if this bug is present in their XWiki too?
>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/Attachments-Macro-not-showing-tp7585339p7585603.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Attachments Macro not showing

Hamster
Thing is, I have noticed that the same problem is also occuring in the LiveTable of the AppsWithinMinutes.

Certain columns will not properly filter when the name starts with a capital letter. Thats why I started to look into the LiveTable code. Custom columns are treated fine, but the "standard" column(s?) are acting weird.

But I would REALY appreciate if SOMEBODY could only CONFIRM that they are seeing the same bug.