Javascript files are not included and object OC and OCA is undefinde


#1

Sorry to hear you’re facing problems :slight_frown:

If you’re urgently looking for support to keep your business running, consider checking out our paid support options.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the following as you can (you can cut and paste this into your topic):


Nextcloud version (eg, 12.0.2):
Operating system and version (eg, Ubuntu 16.04):
Apache or nginx version (eg, Apache 2.4.18):
PHP version (eg, 7.0.22):
Is this the first time you’ve seen this error?:
Yes
Can you reliably replicate it? (If so, please outline steps):

The issue you are facing:
All of a sudden my site went down. I can login but I cannot see my files on dashboard. Also I cannot click on any of the menu items I cannot navigate to other pages. I am getting javascript errors in console all of them are about

Uncaught ReferenceError: OC is not defined
Uncaught ReferenceError: OCA is not defined

I am getting these errors on login page as well but I am able to login.

https://drive.google.com/file/d/0B8BViT9saNi1RWtUSk1kVUMtZms/view?usp=sharing

Here is the screenshot of error I am getting. I think main JS files are not included… Is there any way you can help me with that? Issue is with the front end that’s why there is nothing in log file.

Thanks and Regards,
Athar ud din
The output of your Nextcloud log in Admin > Logging:
Issue is with the front end that’s why there is nothing in log file.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):
Issue is with the front end that’s why there is nothing in log file.

The output of your Apache/nginx/system log in /var/log/____:
Issue is with the front end that’s why there is nothing in log file.


Remember, this information may be requested if it isn’t supplied; for fastest response please provide as much as you can :heart: Feel free to use a pastebin service, otherwise log files can be indented with 4 spaces on each line to present them in a friendlier way on the forum.


#2

I had the same simptomes when playing with the url-modification-options in the config-file.


#3

How did you resolve it?


#4

If I remember correctly, I was trying to setup my nextcloud behind a proxy, which should do SSL-termination.

There are six parameters in the nc-config-file to manipulate domains https://docs.nextcloud.com/server/12/admin_manual/configuration_server/config_sample_php_parameters.html#proxy-configurations

I can’t remember which one was used wrong. Sry.

Do your config include any of these parameters?

Keep in mind that you have to update .htaccess-file (occ comand: maintenance:htaccess:update) before your changes get visible.


#5

If I remember correctly, I was trying to setup my nextcloud behind a proxy, which should do SSL-termination.

There are six parameters in the nc-config-file to manipulate domains https://docs.nextcloud.com/server/12/admin_manual/configuration_server/config_sample_php_parameters.html#proxy-configurations

I can’t remember which one was used wrong. Sry.

Do your config include any of these parameters?

Keep in mind that you have to update .htaccess-file (occ comand: maintenance:htaccess:update) before your changes get visible.


#6

I have found a similar error to this after following an upgrade of 12.03 to 12.04 and then follwing the guide at https://mangolassi.it/topic/12878/install-nextcloud-11-0-2-on-centos-7-with-php-7-1-from-remi/51

I used the instructions there to add a lets encrypt ssl and to change the base url to remove /nextcloud

I cannot for the life of me work out whats wrong with the config

can anyone point me in the right direction?