sitn / crdppf_core

Core / generic parts of the CRDPPF project
GNU General Public License v3.0
1 stars 3 forks source link

Py3 #173

Closed voisardf closed 5 years ago

voisardf commented 5 years ago

Should fix a bug with the print and sets ApacheTomcat 9 as default

voisardf commented 5 years ago

@sbrunner @sitj-raphael : This PR should fix the issue - I commented the title variable on L423, but I rather think that the single quotes instead of having double quotes on this line where the reason for the issue.

Could you test (with and without the title tag) and give me a feedback if it works?

sbrunner commented 5 years ago

I should also do:

@@ -76,15 +76,17 @@ def set_documents(topicid, doctype, docids, featureinfo, geofilter, doclist):
     if len(docs) > 0:
         doc = ""
         for doc in docs:
-            if doc['title'] == '' or doc['title'] is None:
-                doc['title'] = doc['officialtitle']
             if doc['doctype'] == doctype and doc['documentid'] in docids and doc['documentid'] not in doclist:
-                documents.append({"documentid": doc['documentid'], "officialtitle": doc['officialtitle'], "title": doc['title'], "remoteurl": doc['remoteurl']})
+                documents.append({"documentid": doc['documentid'], "officialtitle": doc['officialtitle'], "remoteurl": doc['remoteurl']})^M

             if doc['doctype'] == doctype and geofilter is True and doc['documentid'] not in docids:
-                if doc['title'] == '' or doc['title'] is None:
-                    doc['title'] = doc['officialtitle']
-                documents.append({"documentid": doc['documentid'], "officialtitle": doc['officialtitle'], "title": doc['title'], "remoteurl": doc['remoteurl']})^M
+                documents.append({"documentid": doc['documentid'], "officialtitle": doc['officialtitle'], "remoteurl": doc['remoteurl']})^M

     return documents

Then I will have:

print_1      | Extra Properties: 
print_1      | 
print_1      |  * authorityuuid
print_1      | 
print_1      | All allowed properties are: 
print_1      | 
print_1      |  * authorityname
print_1      |  * authorityurl
voisardf commented 5 years ago

ok I removed those two too. What I don't exactly understand is why this error appears now with this elements when it wasn't an issue before? Has the Linux version become more strict than before? On Windows, no error is thrown for those extra vars though the yaml is configured for it

sbrunner commented 5 years ago

No, but it's can be the print version, you looks to use the 3.10.4, and we use the 3.16, I can try with the 3.10 :-)

sbrunner commented 5 years ago

I just test the version 3.10.7 and effectively it's working better :-)

voisardf commented 5 years ago

Ok, I just downloaded the 3.16.2 war and also the 3.18.x and will test how that works.

But for now, is it possible to use the 3.10.7 for Jura? :-)

sbrunner commented 5 years ago

I test it, the last news is that I get an error with the font ...

sbrunner commented 5 years ago

Thanks for your support, now it's working for Jura :-)

voisardf commented 5 years ago

Cool. :-) Using 3.16.2 on my side also throws a lot of errors and extra parameters stuff. Obviously the behaviour of the print war changed quite a lot between the versions. So I guess the easiest way is to set throwErrorOnExtraParameters: false in this case, because it does not matter if there are a few extra vars.

I'll adapt the print proxy to the newest print war in a later version. So closing the issue https://github.com/sitn/crdppf_core/issues/171 as it is solved using 3.10.7 of the print war

sbrunner commented 5 years ago

Effectively the throwErrorOnExtraParameters catch relay more extra parameters, no objection to set it to false :-)

voisardf commented 5 years ago

👍

voisardf commented 5 years ago

Merging this to set python 3 branch as the new master