Comments (10)
@luke- will try to reproduce/understand
from custom-pages.
@luke- will try to reproduce/understand
Thanks @gevorgmansuryan ! Don't hesitate if I can help.
from custom-pages.
@gevorgmansuryan It works with these changes (the bug is gone)!
I tested 3 cache types:
- No caching: no bug
- File: the bug occurs
- APCu: no bug (but cannot be used when more than 1 Humhub instance is installed on the same server)
The bug occurs only on this server, for all Humhub instances installed on it.
So it's a problem of cache with this server (but that occurs on other servers too as we have this bug mentionned on #86 and #74).
I've checked all server settings with the doc, and "Administration" -> "Information" -> "Prerequisites". Everything seems ok.
Config: Ubuntu 20.04 / PHP 7.4 / mod_php
I've done the folowing test in command line (Controller extending yii\console\Controller
):
echo Yii::$app->cache->get('test_key');
Yii::$app->cache->set('test_key', 'test value');
At the second execution, the "test value" is shown. So caching works.
Thanks for your investigation!
from custom-pages.
@gevorgmansuryan have you got an idea how to fix this problem without having to add code in the core ModuleAutoLoader
class or to enable debug? Thanks!
If it can help, we can have a video call with screen sharing.
from custom-pages.
@gevorgmansuryan Any idea?
from custom-pages.
@funkycram thank you. Can you please try to reproduce, and see what jobs are executing. It will help me to find job that using cache incorrectly (uses yii\WEB\UrlRule from cli). 99% it is related to UrlRules caching.
from custom-pages.
@gevorgmansuryan the bug doesn't occurs with jobs, but when executing a command line with SSH, e.g. php yii queue/run -v
, but it occurs with any command, except php yii cache/flush-all
I can reproduce only on Humhub instances on production (where many people are using the platform during my tests). If I clone the humhub to have a dev instance, I cannot reproduce the bug, and the only difference I can see is that nobody is using the dev instance.
I have 2 ways to solve the bug:
- waiting for the next cron job (the
queue/run
every minute) - flushing the cache by executing the
php yii cache/flush-all
command
In the settings, "Cache Backend" is set to "File".
from custom-pages.
@funkycram yeah, i know that it's doesn't occurs with jobs. There is some job or command that calls/uses Web/UrlManager and stores incorrect cache of Rules. Since i can not reproduce it anyway, there is no other chance to reproduce it and find the problem.
We can try to:
- move
urlManager
config keys fromcommon.php
toweb.php
and try to run commands/queue and see what will happen. Most probably we'll see the error in file which uses UrlManager - try the same with enabled debug mode
from custom-pages.
@gevorgmansuryan thanks for you suggestions.
In the 'components` section, I moved
'urlManager' => [
'showScriptName' => false,
'enablePrettyUrl' => true,
],
from common.php
to web.php
.
The problem is still there.
Then, in /index.php
, I uncommented defined('YII_DEBUG') or define('YII_DEBUG', true);
(only this line, not the YII_ENV
one).
This solves the problem.
I tried commenting it and uncommenting it again, and this is really what makes the difference systematically.
from custom-pages.
@funkycram interesting :) Can you please comment back YII_DEBUG line, change line 47 from protected/humhub/components/bootstrap/ModuleAutoLoader.php
to if (true || $modules === false || YII_DEBUG) {
and try again?
from custom-pages.
Related Issues (20)
- Attched files are displayed in summary while they are not added to summary content HOT 1
- Template type snippet - Cannot edit elements
- Missing Translations HOT 2
- Allow pages in `AccountMenu` HOT 1
- Link broken in email sent by the community. HOT 4
- Bug in using headline
- Bug in using H1
- How to move a custom page from one menu to another ??
- How to embed a snippet in several places, including a custom page ?
- Cannot temporarily hide a custom page or a Snippet without deleting it
- Rename Custom Page `Richtext` Element Types
- Cannot acces to public custom page in public space HOT 2
- Javascript Nonces: Template Pages & HTML pages HOT 14
- Images are public in private page in private space HOT 6
- Dashboard modify
- Highlight the top menu entry if the current URL matches the Target Url of a "Link" custom page HOT 3
- Template > Snippet > JS Nonce not automatically added HOT 1
- required icon for consistency of snippets on dashboard
- Guest Access: Use new public/private global Content Visibility
- **BUG** Custom Pages - Left Menu item state issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from custom-pages.