Wordpress Plugin Fails on activation [closed] - wordpress

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I been working in a WP plugin. Since I was working in my local host I installed the plugin on early development and then started add features. When I tried to compress the completed plugin and install it on a live site I get an Error:
The plugin generated 12624 characters of unexpected output during
activation. If you notice “headers already sent” messages, problems
with syndication feeds or other issues, try deactivating or removing
this plugin.
And all admin page gets outputted on the site:
Seems like this only happens on install via Wordpress. If I copy the files via FTP this does not happen. I suspect the problem in on the admin page that I have some echoes, since I was able to get an error pointing to the line. But like I say it only happens on the activation, if otherwise the plugin works just fine. The error pointed to this line:
<div class="wpcm-pull-left wpcm-section-title"><?php echo(isset($_GET['wpcm_edit_bubble']) && isset($wpcm_edit_item) ? 'Editing Existing Preview' : 'New Item Preview'); ?></div>
I have an inline if to echo something. Not sure what to do. I tried doing this:
function wpcm_admin()
{
if (isset($_GET['page']) && $_GET['page'] == 'wp_bubble_menu') {
include('admin_edit.php');
}
}
Only include the admin code if page is 'wp_bubble_menu' but even that seems to be ignore, the admin code gets outputted all over. Any idea what could be causing this?

I found the problem. It was a silly mistake. I had the plugin file header in the admin file. It is only supposed to go on the main file of the plugin.

Related

Wordpress theme is getting delete itself after migration [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 12 months ago.
Improve this question
I am facing some weird issue in WordPress
I have created a website in my subdomain until the time everything works fine after finalizing the website.
Once I migrated that website to client-server my WordPress theme is getting deleting itself after some time like 15min, I used updraftplus plugin to migrate the website.
I am using Dabble theme
I am attaching screenshot for reference.
It looks like you need to increase the memory limit. Something like this happened to me and it was resolved when I increased the memory limit. Put this code below the code that says wp_debug in the wp-config.php file.
define( 'WP_MEMORY_LIMIT', '256M' );

Can you please help me to resolve https://click.driverfortnigtly.ga/GMtCh34S malware problem? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
My website https://feminspacebeauty.com is effected with a malware redirecting to https://click.driverfortnigtly.ga/GMtCh34S , I tried by asking help from hosting provider they send me a list of effected files details, I tried by removing those files but nothing happened, still the same ! anyone can you please help me
few tips which might help you....
Replace Core WordPress files
Regenerate .htaccess file
Update theme & plugins
I know how you feel. My customer's site was just like your site. my solution is always uninstalling website folders and database before set up backup. Note: Your back up files have to be clean. Can you check this website WordPress Malware Redirect Hack 🔴 How To Detect & Fix It.

How to solve 500 Error issue in Wordpress? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I upload my website backup on my hosting, website database setup successfully but i am getting this error...This page isn’t working www.example.com is currently unable to handle this request. HTTP ERROR 500 .
I am not understanding what is the issue, if i Upload fresh wordpress then it's working fine. Please let me know the solution for this.
`
Internal server errors (error 500) are often caused by plugin or theme function conflicts, so if you have access to your Dashboard, try deactivating all plugins. If you don’t have access to your admin panel, try manually resetting your plugins (no Dashboard access required). If that resolves the issue, reactivate each one individually until you find the cause.
If that does not resolve the issue, try switching to the Twenty Seventeen theme to rule-out a theme-specific issue. If you don’t have access to your Dashboard, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific issue.
If that does not resolve the issue, it’s possible that a .htaccess rule could be the source of the problem. To check for this, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, and rename the .htaccess file. If you can’t find a .htaccess file, make sure that you have set your SFTP or FTP client to view invisible files.

Why am I getting this 404 error suddenly? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 11 months ago.
Improve this question
My site worked fine just a few hours ago. And I have not touched it since then. However, as of now, every single page except for the homepage is showing the following message:
404 Not Found
The resource requested could not be found on this server! Powered By
LiteSpeed Web Server LiteSpeed Technologies is not responsible for
administration and contents of this web site!
The homepage seems to work fine. I can't see any changes and I also scanned it with http://sitecheck3.sucuri.net/ and it returned nothing. I do however, have a plugin called Better WP Security installed and it says that there have been some "Bad login attempts" just before that and that all my WP core files has been modified.
I am not sure what to do now as I don't know how to confirm whether I have been hacked or not.
Could it be my host's fault? Found a thread in a forum with a similar issue:
http://www.ukbusinessforums.co.uk/threads/404-not-found-the-resource-requested-could-not-be-found-on-this-server.291094/
I solved this problem by another simple way...
On a Dashboard - go to Settings, then Permalinks and click Save Changes.
It works perfectly for me.
It sounds like your .htaccess file has been nuked somehow. A plugin attempting to edit it might have corrupted it (I've seen it before). In any case, download a fresh copy of WordPress and re-upload the .htaccess file into the home directory. Alternatively, you can change your permalinks settings to have it generated automatically.
If your site got hacked, typically you will see some hidden divs and malicious script tags injected into your page and/or within your database. If this happens, you need to restore your most recent backup of your files and database. The files on the server should all be considered compromised and a known clean copy must be used.
I had the same problem and saving the permalinks configuration solved for me. As stated here, it happens because there is no .htacess file or that file is corrupted, but I would like to add an observation, at least in my case I didn't have a htacess file because I took a backup from another server and forgot to enable the option to show hidden dot files, thus ending up not including the htacess file in the backup package.
Check the permission given to .htaccess file it must be 755 7=rwx 5=r-x 5=r-x
Permission Action chmod option
======================================
read (view) r or 4
write (edit) w or 2
execute (execute) x or 1

drupal homepage working - all other pages give a 404 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I am new to drupal, I am able to access website homepage fine but i unable to open other pages. its showing like 404 page error. please help me on these issue.
Website Name: http://moserfarmshomes.com
It might be a wrong configuration in you clean-url setup? Look in .htaccess and ?q=admin/config/search/clean-urls
Try setting $base_url in settings.php to http://moserfarmshomes.com
I think you need a fresh install of Drupal.
Try following the steps of this video: http://www.youtube.com/watch?v=7vPnlK1yiLw
I had the same issue and for me it turned out I was missing the .htaccess in my install directory.
So check you copied that as well since it is a hidden file it's easy to forget this.

Resources