VuePress not hot reloading, but does when config.js is changed - vuepress

I'm using VuePress for the first time, and updating .md files isn't triggering live reloading.
If I update the .vuepress/config.js my browser does reload. If I run:
vuepress dev --debug
I see this line in the output, which seems suspicious:
debug watchFiles [
'.vuepress/config.js',
'.vuepress/config.yml',
'.vuepress/config.toml'
]
Is this the error, or is this correct? Googling vuepress watchfiles doesn't show anything particularly useful.

There is an issue discussed in the repository, which hints at a possible problem cause.
A broken connection error may be fixed with hard-refreshing the page. Modifying the templates and the content pages reloads after that.
Check the browser console to see what the actual issue is.
Some actions require manual restart. For example, renaming the template files or adding components will cause an error. Changing the config file also does not trigger the reload.

Add the following to config.js
module.exports = {
host: 'localhost',
...

just delete the those folders and run again.
.vuepress/.cache
.vuepress/.temp

Related

Prestashop 1.7.6.5 not taking into account php module modifications

I've been modifying a module and for some reason prestashop does not take into consideration the code modifications in module.php.
I've made modifications a while back and I need to modify it again due to an update that raises an error, the problem is that I get the error even if I remove said line.
I get this type of error: PHP message: PHP Notice: Undefined index: ordersorderFilter!active in /modules/module/module.php on line 104
I've commented first than removed that line but I still get the error.
It seems like there is a cache somewhere that I can't find, I've deactivated all possible cache in prestashop, activated debug mode, deleted the dev and prod folders in /var/cache/ but I still get the error.
I've used grep on the server to try to find that line, and when I delete it from the file I can not find it anywhere else on the server (but can find it if I add it).
Anybody has any idea?
Thanks a lot!
Prestashop does not perform any kind of caching on the modules PHP files so the problem lies elsewhere or at "lower level" (webserver / proxy ie.).
So check your environment for server-side caching, proxies or PHP accelerators such as opCache that may not serve changes from the source server.
Also try renaming or deleting the offending file altogether and see if the error changes, if not you might simply be looking at the wrong file :)

Failed to load resource: net::ERR_CONTENT_DECODING_FAILED error while loading laravel css file

While executing a web page after loading HTML, CSS file is not loading & not applying the UI changes.
In browser console it is showing the following error Failed to load resource: net::ERR_CONTENT_DECODING_FAILED
One more issue is "that error is occuring only for the first time", If I reload the page the error will be gone & will load the CSS properly.
One solution I found after browsing is to enable gzip encoded, That is already in place.
Console error message
Welcome to stackoverflow.
This is a bit of an annoying error. But ill do my best Lacking what information I have on your error exactly.
What is this error?
This can happen when an HTTP request's headers say that the content is gzip encoded, but it isn't. It doesn't always happen, as you've discovered. But happens occasionally.
What can you do?
Check to see if Route::get('/') pointing to the correct
controller/code?
check to see if output_compression is added to your php.ini
Add this code: zlib.output_compression = On
try going to /config/config.php(this may not be right in your case) and set the following to false $config['compress_output'] = FALSE;
Further reading
(more about what the error actually is)
https://superuser.com/questions/172951/chrome-error-330-neterr-content-decoding-failed
https://www.solvusoft.com/en/errors/runtime-errors/google-inc/google-chrome/330-chrome-error-330/
As I referred about this cause of error, I think adding zlib.output_compression = On to php.ini will help you.
You can find this php.ini file in your php installed folder. In that find zlib.output_compression and initially it will be in OFF stage. Change it to zlib.output_compression = On.
For more information you can refer https://stefantsov.com/fixing-err_content_decoding_failed-in-apachephp/
If you are using Cloudflare make sure Brotli is enabled.
To enable Brotli, follow these steps.
Log in to your Cloudflare account.
Choose the appropriate domain.
Click the Speed app.
Click the Optimization tab.
Toggle the Brotli switch to On.
https://support.cloudflare.com/hc/en-us/articles/200168396-What-will-Cloudflare-compress-
For me the problem was this:
throw new CHttpException(Yii::t('general', 'This category has no product.'));
Becose I use Framework Yii 1.1, I changed that with this:
Yii::app()->user->setFlash('notification', "This category has no product.");
And in front-end I display the message like this:
if (Yii::app()->user->hasFlash('notification')) {
echo '<div>' . Yii::app()->user->getFlash('notification') . "</div>\n";
}

How Can I Fix Firefox Breaking My Site With Content-Security-Policy Warnings?

The site works fine on Chrome/iOS/Safari/Android (you should be able to select and image and proceed to write a message on the next step). Firefox refuses to run my project's main script (you can't select an image or go forward), and gives the following error in the console:
> Content Security Policy: Directive ‘frame-src’ has been deprecated.
> Please use directive ‘child-src’ instead. (3) Unknown
It's very cryptic. I've tried the following:
1) Adding a meta tag for the CSP in the header.
Result: Creates more errors if restrictive, same amount of errors if
left to wildcards on all parameters.
2) Locally serving all scripts.
Result: I still get three unknown CSP errors. It also loads a lot
slower since the dependencies are not being loaded from a CDN.
3) Removing specific scripts.
Result: It reduces the errors by up to one, but it seems all scripts
are equally responsible. Very strange behavior.
Is this a bug in Firefox that is unsolvable? I'm tearing my hair out over this.
I needed to put listeners in $(document).ready as Firefox loads things differently as pointed out to me by Matt Gibson.
Content Security Policy did not cause the script to fail. However, it is a weird error message that gives you no information to where the error is originating, and can potentially break the site, but that is not what happened here.

Magento Admin Backend Blank Page after login

i have a serious problem in Magento Admin Backend. After login its shows a BLANK Page. i used the same files and database in different server, there it was working fine but when i have transferred files into LIVE then Admin issues came. Please help me over this as i got frustrated from last some dayz. If you need any more dertails then plz ask but i need to resolve this soon. Link: http://studywings.com/index.php/admin/
Magento ver: 1.7
flush your magento root /var/cache folder and /var/session folders, It may have previous server session that may cause problems.
Otherwise disable all third party modules and try again. I think this will help
I had the Same problem,
i have also debug the any errors occured, i tried index.php file
ini_set('display_errors', 1);
error_reporting(E_ALL);
$_SERVER['MAGE_IS_DEVELOPER_MODE'] = true;
pleced above code in index.php file. after that i have tried admin login.
showing the errors are session related, header already send errors.
i have to add the code in root/index.php file in top add the following line.
ob_start();
after that tried the login its worked.
Cheers..!
Is url changes to this after click login button or not?
http://yourdomain.com/index.php/admin/index/index/key/(key value)/
if url changes but not not show the dashboard page then go to
app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
make copy of this file
Find the code for setting session cookie parameters these started on line 77
Comment out the final three lines and be sure to remove the comma after $this->getCookie()->getPath(). You should end up with this:
// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
// $this->getCookie()->getDomain(),
// $this->getCookie()->isSecure(),
// $this->getCookie()->getHttponly()
also line 104 comment out :
//call_user_func_array('session_set_cookie_params', $cookieParams);
If there is no change in url after click login then try to uncomment display error and see error_log file of your server
I think this problem is due to file permissions. As you added files from one server to another, permissions might be get changed.. Try to give the permissions to all the files. Check this http://www.mage-shop.com/forum/threads/3-Magento-Admin-Backend-Blank-Page-Error
There are a number of things that can cause it, but it's most common after migrating to a new server, last time it happened to me it was an excessively low php memory_limit setting on the new server - the Admin part of the site uses a lot more resources per user than the frontend.
In general when having this issue:
Flush out your cache by emptying var/cache
Clear out sessions by emptying var/sessions
Check the magento error logs/reports for an error code in var\logs and var/reports
Turn on magento error logs in mysql if logging isn't already on! (look in core_config_data for WHERE path like 'dev/log/active'
Check if your php configuration is displaying errors
Check your apache/php error logs for more clues - memory errors will show up here for example
Try this solution
It sounds like you want to enable Developer mode. Add this to your .htaccess file:
SetEnv MAGE_IS_DEVELOPER_MODE "true"
You may also want to enable display errors in index.php:
ini_set('display_errors', 1);
The best way I have found to debug is with X-Debug in a local environment. You can also use log files to help debug in a production environment, if your unable to run X-Debug in the environment.
I've got a more detailed posting here:
http://www.molotovbliss.com/debugging-tips-and-tricks-with-magento-commerce
Consider also installing XDebug
Hope this helps you!
Just to complete the other answers....
I am upgrading a magento install, and got the same problem, in the end I had another folder inside of var/
magento/var/minifycache
Only worked after clear deleting the files inside of this folder.
I had the same problem after uninstalling an extension. I thought that clearing cache would be enough, and I did without success... later speaking with the technical team, they commented me that it did not work because I hace memcache installed, and needed to be done the cleaning via system - backend (that i coudl not see...)

ABCPdf - Unable to render HTML. Unable to load page

I'm using ABCPdf to convert HTML to a PDF. I'm using the method:
AddImageUrl()
This works fine in Dev and UAT, but on Production I continuously get the message:
Unable to render HTML. Unable to load
page
Anyone see this before? Need more info?
-Ev
I guess you are tying to do URL->pdf generation. It is difficult to directly to do URL->pdf conversion. We ended up URL-Save HTML in local folder ->read HTML and convert to PDF-> delete HTML file from folder - tricky approach but it works. The only flaw is that you need to give read/write permission on a folder on server. Its still better than decreasing security settings.
have you take a look at this http://www.itjungles.com/dotnet/abc2pdf-unable-to-render-html
The default timeout for abcpdf is 15 seconds. If the page is taking longer than 15 seconds, you will get this exception.
Add the line below just after object creation of the document to resolve the issue.
theDoc.XHtmlOptions.Timeout = 10000000;
I found by working backwards (removing elements) from a target html page that omitting the tag (of all things) created this error. also, calling localhost in the target url generated this error.
I have no idea what caused this error, but I stopped the scheduled task that was running, then restarted it and it's worked fnie ever since.

Resources