Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Missing body post Vanilla 2.8.3

Marcin91Marcin91 New
edited June 2019 in Vanilla 2.0 - 2.8

Hello. I got problem with add any post. When I try add comment or new discussion I didn't see message filed.


Comments

  • R_JR_J Admin

    Look at the JavaScript console. There is an error while the file http://urbanstyle.pl/api/v2/locales/en/translations.js should be loaded. Do you have some additional plugins enabled?

  • When I switch off Rich Editor all works.

  • R_JR_J Admin

    But that's not the problem. Take a look at the JavaScript console and you will see the error. You need to find the reason for the error. If you do not do that, several other functionalities will not be available, too.

  • Yes, true. I don't know how. Maybe nginx is a problem.

  • R_JR_J Admin

    No, something tries to load a file that might be non-existent. You need to find out which plugin or if the theme is causing that and then we can try to solve the real problem

  • I installed the script again. The same problem. Everything is default.

  • R_JR_J Admin

    Have you configured something about your language? Just asking because I see that your domain is non-english and the file causing those troubles is called "translation.js"

  • I try on english only and this same problem.

  • R_JR_J Admin

    It would be helpful if you can post a screenshot of the error in the JavaScript console

  • charrondevcharrondev Vanilla Staff

    My guess (without seeing the error) is that you do not have actual URL routing enabled. As a result the translations API endpoint is not working. Is your navigation using query path routing?

    The other possibility is you have nginx to serve all `.js` files as if they are actual files on disk. This translations file does not actually exist on the disk. Please ensure that your nginx configuration falls back to the webserver for assets that cannot be located on disk.

  • R_JR_J Admin

    Sounds reasonable. And I think pretty urls aren't enabled, too.

  • Marcin91Marcin91 New
    edited June 2019

    Here is the screen


    You can also test


    login: test

    password: test


    When I switch post format on WYSIWYG works fine, but I want rich editor.

  • I also noticed a problem in Technical -> API. Maybe it has to do with rich editior.


  • R_JR_J Admin

    You need to make pretty urls work. Add $Configuration['Garden']['RewriteUrls'] = true; to your /conf/config.php


    and use something liek that as your server configuration:


    server {
       server_name urbanstyle.pl www.urbanstyle.pl;
    
       index index.php
       charset UTF-8;
    
       proxy_set_header Authorization $http_x_api_token;
    
       error_log /var/log/nginx/vanilla.release30.error.log warn;
       access_log /var/log/nginx/vanilla.release30.access.log;
    
       root /usr/share/nginx/html/vanilla/installations/release30;
    
       # Block some folders as an extra hardening measure.
       location ~* /\.git { deny all; return 403; }
       location ~ /\.ht { deny all; return 403; }
       location /build/ { deny all; return 403; }
       location /cache/ { deny all; return 403; }
       location /cgi-bin/ { deny all; return 403; }
       location /uploads/import/ { deny all; return 403; }
       location /conf/ { deny all; return 403; }
       location /tests/ { deny all; return 403; }
       location /vendor/ { deny all; return 403; }
    
    
       location ~ \.php$ {
           fastcgi_buffers 16 16k;
           fastcgi_buffer_size 32k;
           fastcgi_split_path_info ^(.+\.php)(/.+)$;
           fastcgi_pass unix:/var/run/php7-fpm.sock;
           fastcgi_index index.php;
           include fastcgi_params;
       }
    
    
       # Default path handling
       location / {
           try_files $uri @vanilla;
       }
    
       location @vanilla {
           fastcgi_param X_VANILLA 1;
           rewrite ^/(.+)$ /index.php?p=$1 last;
           # rewrite ^ /index.php$uri last;
       }
    }
    


  • When I add that to my config the links on site stop working.

  • KasparKaspar ✭✭✭

    Because they include

    index.php?
    


    That can be corrected later.

  • Yes. My links are without index.php

    Before:

    amdzone.pl/index.php?p=/categories

    When I add $Configuration['Garden']['RewriteUrls'] = true;

    My links looks like amdzone.pl/categories But not working after click

  • R_JR_J Admin

    Your web server needs to be configured properly, too. You've mentioned you are using nginx and therefore I posted that server config.

  • My nginx server supports htaccess compatible with apache 2.4

  • R_JR_J Admin

    Great. But Vanilla requires for several features that you use pretty urls. If your forum breaks when you enable pretty urls, you need to change the http server configuration.

    If your nginx server can munch .htaccess files, try to feed it with the enclosed .htacess.dist file. If that doesn't work you must be very specific if you want us to help: you have a http server problem and not a Vanilla problem. That is quite difficult to support, since your hosting setup can be anything and maybe none of us has seen a setup like that before.

Sign In or Register to comment.