Comments (6)
@pandafy I am Working on this issue.
from openwisp-notifications.
The internal.openwisp.test
and external.openwisp.test
hostname provided above are just for example. These hostnames could be anything depending on the installation.
To understand the issue better, check the HTML code of the rendered notification element in the UI
Here, an absolute URL is used for the device. We want to have the relative URL so that the URL works across different hostnames.
What's the catch?
The same logic is used for adding notification message in the emails. We want the emails to continue having absolute URLs, otherwise users would not be able to follow the URL to OpenWISP.
from openwisp-notifications.
Hi @nemesisdesign, I wanted to contribute to this issue if it is still open, I have installed the openwisp-notifications and the setup part is done for the same, I wanted the steps like how can I reproduce the issue based on which I can change the code
from openwisp-notifications.
Steps to replicate the issue
- Run the test project in this repository
- Edit the
/etc/hosts
file to pointinternal.openwisp.test
andexternal.openwisp.test
to127.0.0.1
using the following command
sudo bash -c 'echo "127.0.0.1 internal.openwisp.test external.openwisp.test" >> /etc/hosts'
- Update the site objects at http://127.0.0.1:8000/admin/sites/site/ as following:
Note: Instead of deleting the existing site object, edit it to useexternal.openwisp.test
. - Generate a default notification by using the
create_notification
management command from the shell
cd tests/
./manage.py create_notification
- Open http://internal.openwisp.test:8000/admin/ and click on the notification in the notification widget
Actual result
After clicking on the notification, the user to sent to the target object with external.openwisp.test
domain. E.g.: http://external.openwisp.test:8000/admin/openwisp_users/organization/b150de21-65b2-4499-b1a8-3af78e8442b5/change/
Expected result
After clicking on the notification, the URL should take the user to the target object with internal.openwisp.test
domain. E.g.: http://internal.openwisp.test:8000/admin/openwisp_users/organization/b150de21-65b2-4499-b1a8-3af78e8442b5/change/
from openwisp-notifications.
It is important to update the ALLOWED_HOSTS
settings in tests/settings.py like below to replicate this issue
ALLOWED_HOSTS = ['internal.openwisp.test', 'external.openwisp.test', '127.0.0.1']
Thanks to @arup1221 for reporting this in the developer chat. 👏🏼
from openwisp-notifications.
Thanks also, @pandafy, for allowing me to work on this project. I am currently figuring out whether this bug is related to notification generation and how to redirect it to
http://internal.openwisp.test:8000/admin/openwisp_users/organization/<id>/change/."
from openwisp-notifications.
Related Issues (20)
- [refactor] Create a channel layer group for each user
- [bug] Notification toast does not close on slow internet connections HOT 1
- [change] Add celery time limits to tasks HOT 2
- [bug] Unsubscribe button in device page is slightly higher than other button
- [tests] Fix project dependent test cases (openwisp_notifications.tests.test_admin)
- [change!] API URL structure is not consistent with other OpenWISP modules
- [docs] Update screenshots of openwisp-notifications to latest openwisp theme
- [bug] Organization.DoesNotExist openwisp_notifications.tasks.ns_organization_created
- [bug] Notification sound file path is hardcoded
- [bug] Paths to some static images in CSS doesn't play well with other file storage systems HOT 1
- [feature] Add dedicated notification type for internal errors HOT 3
- [feature] Add REST API to manage notification preferences of other users HOT 1
- [feature] Add link to manage notification preferences to email notifications HOT 1
- The openWisp web page is not responsive HOT 2
- [change] Migrate to openwisp-users REST API filters
- [ui:bug] Notification Toast Container Disappears HOT 1
- [feature] Centralize Background API Task Notification Logic HOT 1
- [change] Do not send email notifications if the email of the user is not flagged as verified
- [bug] ReconnectingWebsocket on the allauth account pages HOT 1
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 openwisp-notifications.