q2a / question2answer

Question2Answer is a free and open source platform for Q&A sites, running on PHP/MySQL.
http://www.question2answer.org/
GNU General Public License v3.0
1.63k stars 627 forks source link

Fix: Fix transparent background of top-right menu #968

Closed emranbm closed 1 year ago

emranbm commented 1 year ago

What's wrong?

Using the default theme (SnowFlat), the top right menu has a corrupted background, as shown in the image below.

Screenshot from 2022-10-10 21-14-41

What does this PR do?

This PR simply adds extra space for the menu container by extending its height. It will look like this: Screenshot from 2022-10-10 21-14-10

pupi1985 commented 1 year ago

Can you provide the steps to replicate this issue? Please, test in this default setup: https://www.question2answer.org/qa/

emranbm commented 1 year ago

I've no idea why it's correct on the demo site. However, here's the reproducing environment: Dockerfile:

FROM php:7.4.30-apache
RUN apt-get update && apt-get install -y curl libcurl4-openssl-dev
RUN docker-php-ext-install mysqli
RUN docker-php-ext-install curl
RUN docker-php-ext-install json
RUN apt-get update && apt-get install -y git
RUN git clone -b v1.8.6 --depth 1 https://github.com/q2a/question2answer.git /var/www/html/

docker-compose.yml:

services:
  q2a:
    build:
      context: .
    depends_on:
      - database
    ports:
      - 80:80
    environment:
      DB_HOSTNAME: database
      DB_USERNAME: q2a
      DB_PASSWORD: dummy
      DB_DATABASE: q2a_db
  database:
    image: mysql:5.7.39
    environment:
      MYSQL_ROOT_PASSWORD: dummy
      MYSQL_DATABASE: q2a_db
      MYSQL_USER: q2a
      MYSQL_PASSWORD: dummy
pupi1985 commented 1 year ago

I'm unable to reproduce this in Google Chrome 106.0.5249.91 (Official Build) (64-bit) and Mozilla Firefox 102.3.0esr. What browser are you using?

Side notes:

emranbm commented 1 year ago

Thanks for the side notes. I applied them, but no luck. Encountered the corrupted menu on two different machines, persistently.
Chrome version: 105.0.5195.102 Firefox version: 105.0

Have you tried the above-mentioned environment? It should reproduce the issue.

pupi1985 commented 1 year ago

I tested your environment and it works perfectly fine. Considering this version of Q2A has been around for 1.5 years, the steps to reproduce the issue don't reproduce it, and nobody has mentioned this so far, I have to assume there is something wrong with your setup (operating system, browser, etc.). The fact that this is replicated on another system, makes me wonder if it has been improperly setup as well.

emranbm commented 1 year ago

Ok, I've patched it locally for my environment.
I didn't get why it's not happening in your system.
However, thanks for your time investigating my issue.