Posted: July 21, 2016 at 2:31 pm
|
I’ve got EE4 in a development stage and everything worked fine up to a month ago. All of a sudden I got a blank screen with the following error message: No direct script access allowed I’ve tried to update the EE4 plugin to the latest version 4.9.3.P but i’m still getting a blank screen. I can’t figure this one out guys. A little help please. Joshua |
You could check your wp-config.php file. Near the bottom it should have this:
If the above checks out, it may help to do a fresh install of Event Espresso 4 where you delete the event-espresso-core-reg folder from wp-content/plugins, then install a fresh copy that you download from your account page. |
|
|
Hi Josh, I already tried that but again uploaded the latest version. Still the same error message. Renaming the dir ‘plugins’ does not help either. The wp-config file also looks good. |
If you’ve renamed the plugins dir then Event Espresso shouldn’t even be activated. If that’s the case then this may be an issue with your core WordPress installation. Have you tried uploading a fresh copy of WordPress? |
|
|
Josh, I’ve reinstalled WordPress version 4.5.3 but still to no succes. Do you have any other suggestions? What i’ve so far tried.
Hope that you can think of something. P.s. my hoster is also looking for a fix but can see any problemen occurring on the server. |
As you’ve disabled all plugins on the site either there either a problem with the theme or one of your WP core files (also note its possible the site/sever has been compromised). Are you using the default theme or your own? Is this a single site install or multi site? You can’t access the admin at all and whichever url you navigate to shows ‘No direct script access allowed’, correct? Check the .htaccess and index.php file within your root directory. Your .htaccess file should have something like the first example shown here: https://codex.wordpress.org/htaccess Your index.php file should have something very similar to this: http://take.ms/mgApc That’s from one of my test sites, you may have a different path in the require() call but not much else. |
|
|
Hi Tony, The problem is in the theme. Because after uploaden twentysixteen and renaming my theme i could log in an activate WordPress default theme. That worked! Wat do I need to look for in the theme? Joshua |
What theme are you using? If your using a theme you have purchased I’d start by updating to the latest version. We can’t provide support for any themes we have not built (we simply don’t know anything about the code used), you’ll need to contact the support team for the theme you are using and see if they have a solution. |
|
|
I found the culprit. In my theme i’ve got a folder /includes/ee4/ There I have a file called widgets.php. This file contains the following code. https://gist.github.com/lorenzocaum/08f0629426cace30f652d313b7beedf8 |
Why do you have a copy of the EEW_Upcoming_Events.widget.php file within your theme? Because of the first line in that file if you call the file directly it will throw the above error.
However you should not have a copy of that file within your theme, are you trying to create a custom widget? |
|
|
This had to do with a customization of some output in the theme. It’s been a while since but I got this through the Event Espresso form. I’ll delete the file so problem solved. Thanks! |
It is possible to create custom widets based on the default one from EE, then you can use that widget in place of the original within the widgets section. Here is an example of create a custom widget: https://gist.github.com/Pebblo/d0d5f485ae0599e56e20 That’s the widget within a Custom Functions Plugin, you can alter the output of the widget within that, install the plugin and add the ‘Custom Event Espresso Upcoming Events’ widget in pace of the other. |
|
|
Thanks Tony. I’ve managed to resolve this problem! |
Great 🙂 If you run into any further problems please let us know. |
|
The support post ‘No direct script access allowed theme error’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.