Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Nicolai

White page on admin login – sometimes

I have a very annoying problem with Admin Colums Pro (v4.3.5) and the Admin Columns Pro WooCommerce AddOn (v3.1.2).

I can login as Administrator and work on the WordPress backend for days without any problems – but eventually some day when I try to login I will just get a white page instead of the Dashboard! I can not login even after trying several times and with different admin users. Strangly with users of a lower class (like “Editor”) I could login!

Even if I set WP Debug to TRUE in wp-config.php the white page remains completely empty! No error code or any other content is displayed. After lots of trial and error I found out that I can use FTP and just rename the “ac-addon-woocommerce” folder (in wp-content/plugins) to something like “_ac-addon-woocommerce” to temporarily disable the Admin Columns Pro WooCommerce AddOn. As soon as I rename it the dashboard loads just fine. I can then re-rename the add-on (to activate it again) and everything will work just fine for several days again.

This is hapopening now for several months (since I bought the plugin) and I have since updated both the core plugin and the add-on several times since then, always hoping that this problem will be solved by the update – but it always returns.

Any suggestion how to solve this once and for all would be highly appreciated as this also not only happens to me (I can use the FTP “fix”) but to the client and he can not use FTP. Thanks!!

Kind regards
Nicolai

5 years, 7 months ago
Stefan van den Dungen Gronovius
Developer

Hi Nicolai,

Thanks for your message.
A white screen probably means you have a fatal error on your website. It is strange that WP_debug won’t give you that information, but if it is a 500 error, I expect there should be something about this error in your error log. Can you try to find this information and send it to support@admincolumns.com so we can analyse the cause of the issue?

So if I understand you correctly, you already have the issue on the dashboard and not only on the edit pages? If that is the case, then it is probably not related to the columns itself but something else in our code. We need some more information to be able to help you with this issue.

5 years, 7 months ago
Nicolai

Hi Stefan,

I did as you suggested and activated error logging. The past days all was ok but today the white page appeared again and the error log reveals a “Fatal Error”:

[10-Aug-2018 11:05:46 UTC] PHP Fatal error: Cannot declare class AC_Column_PIMPERTZ_MW, because the name is already in use in /html/wordpress/wp-content/themes/ronneby_child/includes/nab-columns.php on line 16

The error mentions the file “nab-columns.php” in which I have created two new ACP column types, carefully following your guide “Creating a new column type” and using the starter-kit that you provide in that guide.

I have uploaded both the error log and my small custom code to my Dropbox here, so you can investigate: Admin Columns Pro Bug.zip

Is there a bug in your code or did I do something wrong in my code? I followed your guide very carefully :(

Thanks for your help!

Kind regards
Nicolai

5 years, 7 months ago
Stefan van den Dungen Gronovius
Developer

Hi Nicolai,

Thanks for the input.
The specific error indicated that the file is loaded twice or that your specific column code is in multiple files defined. Make sure that your code is not defined multiple times in your codebase and that the file is loaded just once. You can use the require_once() function to make sure of that.

I did have a look at your code and it looks ok. I was also able to load the columns. I do have some suggestions though.

1) When you extend our columns, make sure you use our new name spaced classes (I changed it in the file below)
2) You can check more specifically for a WooCommerce overview. Your columns are now loaded for every WooCommerce overview page

You can find some changed/suggestions for these points in the codeshare below
https://codeshare.io/507Z9N

5 years, 7 months ago
Nicolai

Hi Stefan,

Sorry for not replying sooner, I was out of office for a few days.

Thank you very much for your explanation and also for your update and suggestions on the code. I have now fully replaced our code with your updated code and also I have replaced the “include” that loads the file with “require_once” as you suggested, but sadly it didnt help :( The error re-appears exactly like it did before and the error message in error.log is also still the same:

[24-Aug-2018 13:54:03 UTC] PHP Fatal error: Cannot declare class AC_Column_PIMPERTZ_MW, because the name is already in use in /html/wordpress/wp-content/themes/ronneby_child/includes/nab-columns.php on line 19

I have now also text-searched the whole theme, child-theme and plugins folder to make 100% sure that the text string “AC_Column_PIMPERTZ_MW” does only occur once in the nab-columns.php (which is now loaded with “require_once”).

Any other ideas what could be wrong? Thanks!!

Best,
Nicolai

5 years, 7 months ago
Stefan van den Dungen Gronovius
Developer

Hi Nicolai,

I’m not sure what could cause the problem at this moment.
Did you try to add your code to a separate plugin to isolate the issue?
I pasted your code to a new plugin and everything seems to be working fine.

Stefan

5 years, 7 months ago
Nicolai

Hi Stefan,

do you think putting my code into a plugin instead of functions.php will make a difference?

Also I wonder: why is this bug appearing on login? After login the page which is loaded is the Dashboard and the Admin Columns are not used on the Dashboard. Maybe your suggestion to include a check to only load the code on a WooCommerce overview could help with this issue? How exactly could I check for that?

Thanks again!!
Nicolai

5 years, 6 months ago
Stefan van den Dungen Gronovius
Developer

Hi Nicolai,

It should not make a difference.
When you remove the code from your theme, is the column still available? If so, then it is loaded somewhere else in your code.

I’ve added a specific check example for WooCommerce Orders in the codeshare I send you before.
You could try to add this to your code, but I also expect that this should not make any difference.

5 years, 6 months ago
Nicolai

Hi Stefan,

I see the latest release of ACP (v4.3.7) contains this:

Fatal error on Taxonomy overview pages when filtering on meta columns

Could this have something to do with our problem?

Thanks!
Nicolai

5 years, 6 months ago
Stefan van den Dungen Gronovius
Developer

Hi Nicolai,

No I don’t believe that specific issue is not related to this issue.
Your column runs on the WooCommerce pages, so that has nothing to do with the Taxonomy overview page.
Besides that, for some reason, your columns are loaded multiple times which means there is a trigger or something else in the code that’s loading your file twice.

Another approach that could solve your problem is to put your class files in separate files and make sure those files are loaded once. Or you could write an autoloader, that could also prevent you from loading the class multiple times. You could even wrap it in a specific check if the class already exists. If not, you load the file, otherwise, it is already loaded apparently.

5 years, 6 months ago

You must be logged in to reply to this topic.