Page 4 of 4

Re: [3.1][3.2][RC] Survey

Posted: Thu Mar 01, 2018 5:15 pm
by pvu
1) for the style: my issue is not the colors of the Survey CSS - well, ok, I don't like them but that's another issue ;-) - but my own style based on prosilver: on basic topics (whatever the user) or on topics with a survey seen by a power user, there is a background image that disappear on topics seen by normal users. The issue itself is not important, but it may be a symptom.

2) for the permissions, same result, they seem ok to me:
https://drive.google.com/open?id=1af9te ... EaEb1zytgb

BTW, thanks for the tip about the effective permissions, can be useful.

Re: [3.1][3.2][RC] Survey

Posted: Thu Mar 01, 2018 10:22 pm
by Ithron
I'm out of ideas... last thing you could do is debug the corresponding code (insert some debug output that tells you at which clause it forbids the answering of the survey).

Re: [3.1][3.2][RC] Survey

Posted: Fri Mar 02, 2018 10:10 am
by pvu
Ithron wrote:
Thu Mar 01, 2018 10:22 pm
I'm out of ideas... last thing you could do is debug the corresponding code (insert some debug output that tells you at which clause it forbids the answering of the survey).
yeah, I've thought about adding some debug too, but I'm not used to develop in this environment, so I didn't know how to log. If you send me an example, I can install it and modify it to add more traces if necessary.

Note that I have a dev platform running on wamp, so I can do tests safely and use Apache's logs.

Re: [3.1][3.2][RC] Survey

Posted: Thu Mar 08, 2018 1:01 pm
by pvu
Ok, so debug tells me that f_survey_answer = false for normal users. Despite what I see in ACP.
I'll check the database, I think that's the easiest way to investigate at that stage.

Re: [3.1][3.2][RC] Survey

Posted: Thu Mar 15, 2018 9:32 am
by netzversteher
Hello Ithron
I have the problem that I can't set user rights for " who can answer the questions".
As you described it in my previous post, this doesn't work.
There is already a post in the German PHPBB Forum.
I'd be really grateful for help!
https://www.phpbb.de/community/viewtopi ... 2&start=10

Re: [3.1][3.2][RC] Survey

Posted: Thu Mar 15, 2018 11:43 pm
by Ithron
Ok, I think there might be a problem with the extension and PHPBB-3.2.2.
On my server, I have still running PHPBB-3.2.1, so I haven't tried out the 3.2.2 version. I assume that this is the cause to both pvu's and Netzversteher's problems.

Will take a look at it on the weekend and then get back to you guys. Thanks for reporting.

Re: [3.1][3.2][RC] Survey

Posted: Fri Mar 16, 2018 3:21 am
by Ithron
I identified the problem. So far, the permissions were added as "global" permissions. That seemed to work until now, but not any more. They need to be changed to "local" (for m_survey, both local and global makes the most sense to me).

If you would install the extension from scratch, just changing all true to false in the migrations file, lines 141 and 142 as well as adding array('permission.add', array('m_survey', false)), as new line 144 would do the trick.

However, if you have already running the extension for a while and don't want to delete all the data, the migrations need to be done properly. For that, I wrote a set of migrations files. The following needs to be done in order to fix the bug:
  • Download the Updated extension
  • Overwrite the old files with new files
  • Disable the survey-extension
  • Enable the survey-extension
Can someone confirm that this fixes the problem with the permissions?

In case you are wondering, why the github-url is different from the one before: Unfortunately, I'm currently abroad and don't have access to the original github repository via my home computer... For now, I just created a new github account and put the fix there. The commit of those files to the original github rep will need to wait until end of April.

Re: [3.1][3.2][RC] Survey

Posted: Mon Mar 19, 2018 12:46 pm
by pvu
Thanks, it works, great job! However, please note that I haven't upgraded to 3.2.2 yet, I'm still in 3.2.1.

I still have my background issue, but that's just a problem with my CSS being unfriendly with your CSS, so it's up to me to fix it.

Re: [3.1][3.2][RC] Survey

Posted: Mon Mar 19, 2018 1:16 pm
by pvu
pvu wrote:
Mon Mar 19, 2018 12:46 pm
I still have my background issue, but that's just a problem with my CSS being unfriendly with you CSS, so it's up to me to fix it.
Not so sure, finally: for "normal" users, the hierarchy of classes is changed by Survey, I think. Instead of having the different classes "post has-profile bg2" (or bg1) nested in the class "page-body", they are at the same level. So they have not inherited the properties of "page-body".

So, when it's OK (no survey or survey as seen by me):

Code: Select all

<div id="wrap" class="wrap">
	<div id="page-header">
	<div class="page-body" id="page-body" role="main">
		<div class="post has-profile bg2" id="p46637">
		<div class="post has-profile bg1" id="p46638">
		<div class="post has-profile bg2" id="p46639">
And when it's KO:

Code: Select all

<div id="wrap" class="wrap">
	<div id="page-header">
	<div class="page-body" id="page-body" role="main">
	<div class="post has-profile bg2" id="p46637">
	<div class="post has-profile bg1" id="p46638">
	<div class="post has-profile bg2" id="p46639">
I guess your HTML code is missing something in the second case. And that may explain some of the issues with other styles.

It's probably linked to the additional line for admins, where you can choose any user to add an answer.

Re: [3.1][3.2][RC] Survey

Posted: Tue Mar 20, 2018 10:09 am
by pvu
Got it!

It was just a matter of moving a ENDIF 2 lines below in styles\prosilver\template\viewtopic_survey.html to close the DIV within the IF/ENDIF:

Code: Select all

377d376
< <!-- ENDIF -->
379a379
> <!-- ENDIF -->
I'll send you the fixed file in MP (still cannot attach files, sorry).

Re: [3.1][3.2][RC] Survey

Posted: Tue Mar 20, 2018 11:07 pm
by Ithron
Nice spotting! And thanks for the fix, I committed it to the temporary github repo.

Re: [3.1][3.2][RC] Survey

Posted: Sat Apr 21, 2018 2:26 pm
by Ithron
All fixes are now in the regular github repository.