Configuring smart-links

327 views
Skip to first unread message

Rui Pires

unread,
Feb 4, 2014, 7:57:09 AM2/4/14
to mayan...@googlegroups.com
Hi,

I am trying Mayan EDMS out, using the virtual-box appliance image available available in the download section of mayan-edms.com

I am considering using it for personal use (at least for now).
Being the nitty picky geek that I am, I tried fiddling around to see how it would help me organize the documents.

Indexes look like a great feature of mayan. I just had a though time figuring out that I needed to manually go to tools->maintenance->rebuild indexes to rebuild them.

Smart-links seem great for ease of use, since I can, for example, link a bill to the receipt I got for paying it later on.

I tried doing a simple test, and create a smart-link that would look into the all documents with the same "data_original" meta-data I created.
This is the condition I created:
and foreign metadata.data_original is equal to metadata.data_original

With just two files with the same meta-data values I was expecting to see them show up in each others smart-links section.

I got this error instead:
Page unavailable
Sorry, but the requested page is unavailable due to a server problem.
Administrators have been notified, so check back later.


I have no idea what I am doing wrong.

I do have some basic Python experience, but am a complete newbie with Django, so I have no clue how to figure this out.

The documentation (https://mayan.readthedocs.org/en/latest/topics/smart_links.html) did not help much, since it did not show a working example.


Can anyone help me ?


Regards,

Rui Pires


__

www.sennin.pt

ranjith pillay

unread,
Feb 5, 2014, 2:53:47 AM2/5/14
to mayan...@googlegroups.com
Hi Rui,

This does not look like the smart link configuration per-se, but something to do with the server level configuration. Your smart link condition looks okay. I can confirm that I have used similar conditions to create smart links. But I have'nt used the virtual appliance but installed it directly. Maybe you should try installing from the source.

Regards,
Ranjith

Rui Pires

unread,
Feb 5, 2014, 11:29:13 AM2/5/14
to mayan...@googlegroups.com
Ok, I will try to install it using the fabfile and then report back,

Thank you.

Rui Pires

unread,
Feb 8, 2014, 8:59:21 AM2/8/14
to mayan...@googlegroups.com
Hi,

I have installed mayan via the fabfile into an ubuntu server 13.10.
It seems the fabfile needs to be slightly changed to work there: the mayan apache site needs to be named mayan.conf.

But I still get the same exact error.

I tried enabling django's debug as suggested here: https://mayan.readthedocs.org/en/latest/topics/development.html
And added a new console logger for the 'linking' app, since it seems to be the one that is failing. I did keep the logger in the example for the 'documents' app.

I did a tail -f on all the apache logs, and when I accessed the offending link (http://golem01/linking/smart/for_document/1/) I just got a single entry from the logs:
10.0.0.141 - - [08/Feb/2014:09:25:57 -0400] "GET /linking/smart/for_document/1/ HTTP/1.1" 500 721 "http://golem01/documents/1/view/advanced/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0"


Can anyone help me ?

Best regards,
Rui Pires

Mathias Behrle

unread,
Feb 8, 2014, 5:50:19 PM2/8/14
to mayan...@googlegroups.com
* Rui Pires: " [Mayan EDMS: 660] Re: Configuring smart-links" (Sat, 8 Feb 2014
05:59:21 -0800 (PST)):

Hi Rui,

> I have installed mayan via the fabfile into an ubuntu server 13.10.
> It seems the fabfile needs to be slightly changed to work there: the mayan
> apache site needs to be named mayan*.conf*.
>
> But I still get the same exact error.

I can confirm this error here.

> I tried enabling django's debug as suggested here:
> https://mayan.readthedocs.org/en/latest/topics/development.html
> And added a new console logger for the 'linking' app, since it seems to be
> the one that is failing. I did keep the logger in the example for the
> 'documents' app.
>
> I did a tail -f on all the apache logs, and when I accessed the offending
> link (http://golem01/linking/smart/for_document/1/) I just got a single
> entry from the logs:
> 10.0.0.141 - - [08/Feb/2014:09:25:57 -0400] "GET
> /linking/smart/for_document/1/ HTTP/1.1" 500 721
> "http://golem01/documents/1/view/advanced/" "Mozilla/5.0 (X11; Ubuntu;
> Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0"

Enabling debugging in settings.py by setting

DEBUG = True

prints a very exhaustive traceback.

The error can be fixed by removing the erroneous parameter as in the following
patch:

diff --git a/apps/linking/forms.py b/apps/linking/forms.py
index 46e9245..ce7b0a0 100644
--- a/apps/linking/forms.py
+++ b/apps/linking/forms.py
@@ -47,7 +47,7 @@ class SmartLinkImageWidget(forms.widgets.Widget):
output.append(u'<div class="tc">%s</div>' % document)
output.append(u'<div class="tc">%s: %d</div>' % (ugettext(u'Pages'), document.pages.count()))
output.append(get_tags_inline_widget(document))
- output.append(u'<div style="padding: 5px;">' % document)
+ output.append(u'<div style="padding: 5px;">')
output.append(document_html_widget(document, click_view='document_display', view='document_preview_multipage', fancybox_class='fancybox-noscaling', gallery_name=u's
output.append(u'</div>')
output.append(u'<div class="tc">')

HTH,
Mathias
--

Mathias Behrle
MBSolutions
Gilgenmatten 10 A
D-79114 Freiburg

Tel: +49(761)471023
Fax: +49(761)4770816
http://m9s.biz
UStIdNr: DE 142009020
PGP/GnuPG key availabable from any keyserver, ID: 0x8405BBF6
signature.asc

Rui Pires

unread,
Feb 9, 2014, 6:54:29 PM2/9/14
to mayan...@googlegroups.com
Hi Mathias,

That seems to do it, thank you!
Will you submit a pull request for this fix ?

Cheers,
Rui

Mathias Behrle

unread,
Feb 10, 2014, 9:14:16 AM2/10/14
to mayan...@googlegroups.com
* Rui Pires: " Re: [Mayan EDMS: 662] Re: Configuring smart-links" (Sun, 9 Feb
2014 15:54:29 -0800 (PST)):

Hi Rui,

> That seems to do it, thank you!
> Will you submit a pull request for this fix ?

Thanks for your feedback. Yes, I will in the near future, when I have checked
another issue perhaps related with this one.

Cheers,
Mathias
--

Mathias Behrle
signature.asc
Reply all
Reply to author
Forward
0 new messages