[3.1][3.2][RC] Survey

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Anti-Spam Guide
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
pvu
Registered User
Posts: 11
Joined: Sun Dec 03, 2017 2:28 pm

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

Post by pvu » Thu Mar 01, 2018 5:15 pm

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.

Ithron
Registered User
Posts: 24
Joined: Sun Mar 19, 2006 4:39 pm

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

Post by Ithron » 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).

pvu
Registered User
Posts: 11
Joined: Sun Dec 03, 2017 2:28 pm

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

Post by pvu » Fri Mar 02, 2018 10:10 am

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.

pvu
Registered User
Posts: 11
Joined: Sun Dec 03, 2017 2:28 pm

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

Post by pvu » Thu Mar 08, 2018 1:01 pm

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.

netzversteher
Registered User
Posts: 6
Joined: Tue Oct 03, 2017 8:53 am

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

Post by netzversteher » Thu Mar 15, 2018 9:32 am

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

Ithron
Registered User
Posts: 24
Joined: Sun Mar 19, 2006 4:39 pm

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

Post by Ithron » Thu Mar 15, 2018 11:43 pm

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.

Ithron
Registered User
Posts: 24
Joined: Sun Mar 19, 2006 4:39 pm

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

Post by Ithron » Fri Mar 16, 2018 3:21 am

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.

pvu
Registered User
Posts: 11
Joined: Sun Dec 03, 2017 2:28 pm

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

Post by pvu » Mon Mar 19, 2018 12:46 pm

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.
Last edited by pvu on Mon Mar 19, 2018 5:26 pm, edited 1 time in total.

pvu
Registered User
Posts: 11
Joined: Sun Dec 03, 2017 2:28 pm

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

Post by pvu » Mon Mar 19, 2018 1:16 pm

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.

pvu
Registered User
Posts: 11
Joined: Sun Dec 03, 2017 2:28 pm

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

Post by pvu » Tue Mar 20, 2018 10:09 am

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).

Ithron
Registered User
Posts: 24
Joined: Sun Mar 19, 2006 4:39 pm

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

Post by Ithron » Tue Mar 20, 2018 11:07 pm

Nice spotting! And thanks for the fix, I committed it to the temporary github repo.

Ithron
Registered User
Posts: 24
Joined: Sun Mar 19, 2006 4:39 pm

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

Post by Ithron » Sat Apr 21, 2018 2:26 pm

All fixes are now in the regular github repository.

Post Reply

Return to “Extensions in Development”

Who is online

Users browsing this forum: eeji, Havym, JohnDory, PowerIdeas, Restless Rancor and 29 guests