Comments (15)
@mickmister can you simply state for beginners what domain to be replaced with what domain as this looks like domain string replacement issue, thanks
from mattermost-plugin-custom-attributes.
@duke7able By default, the domain is blank in the request. For instance, an example might be:
fetch('/api/users');
But we want
const siteURL = getSiteURL(state);
fetch(siteURL + '/api/users');
There is no hardcoded domain to put here because each server is self-hosted, and thus will have a different domain. The main reason why this is needed is for deployments that host their server on a subpath. The site URL would be something like https://company.com/mattermost
and so https://company.com/mattermost/api/users
would be the resulting URL for example.
Have I made the task more clear?
from mattermost-plugin-custom-attributes.
I can work on it if a PR for this does not already exist.
from mattermost-plugin-custom-attributes.
Thanks @sudiptog81 ! All yours 😄
from mattermost-plugin-custom-attributes.
Opening back up for grabs. You can find a PR that started work on this ticket at #58
from mattermost-plugin-custom-attributes.
@jasonblais / @DHaussermann - Looking into this one a bit it looks like it's related to the version of Mattermost Reduce in the package. The version that is included right now (5.26) does not accept the searchTeams parameter of (term, options)
, but it seems in later versions this is changed - mattermost/mattermost-redux#1200.
I updated the version locally and tested and it seems to be working fine. Do we know if there is an overall impact in bumping the version up?
from mattermost-plugin-custom-attributes.
Thanks! Not sure, will defer to @mickmister and @DHaussermann who may know more.
from mattermost-plugin-custom-attributes.
@coltoneshaw Is this the ticket you meant to comment on? Where does the searchTeams
action come into play with this ticket?
from mattermost-plugin-custom-attributes.
Sorry, the original solution - #58 that is above appears to be a functioning solution to this issue. However, the issue isn't with that PR but with the version of mattermost-redux
contained in the plugin. The link https://github.com/mattermost/mattermost-plugin-custom-attributes/blob/2800ede9ab3d5be1eaefb0b6701369c2d1a88737/webapp/src/components/admin_settings/teams_input/index.js#L12 does not accept the parameters that are passed to it based on the version of redux is what I'm seeing.
So, my curiosity is what impact would increasing the redux package version have on this plugin? I have a functioning version of this with the fix for this issue on an updated redux package.
from mattermost-plugin-custom-attributes.
Okay I understand the searchTeams
issue now. The redux function had changed its arguments, and this plugin's code assumed the new changes, but is still importing the old version of the function. It's possible updating the redux package would have similar side effects with other functions that are in the opposite situation of expecting the old version of functions. I can take a look at all the imports if you'd like or I can do that during PR review if you are submitting a PR.
Should/does the searchTeams
issue have its own ticket? I'm still curious how the discussion ended up on this one
from mattermost-plugin-custom-attributes.
@coltoneshaw Sorry I forgot to add the your mention above ^
from mattermost-plugin-custom-attributes.
It looks like the discussion ended up here because when @DHaussermann was testing a fix for this issue it was throwing an error on the searchTeam
but not searchUsers
. Probably my fault for moving the conversation here, happy to open a new issue. Interestingly enough it looks like it may have been introduced here - #50 when swapping to a versioned release.
If you download the plugin from the repo in its unpublished state now you'll also see the searchTeams
error.
from mattermost-plugin-custom-attributes.
@coltoneshaw Okay now I think I actually understand 😅 There was an issue discussed in the PR and you tracked down the root cause of that issue 🎉
Yes I think this should have its own issue for tracking. Updating the mm-redux repo should do the trick as you have noted and confirmed works
If you download the plugin from the repo in its unpublished state now you'll also see the
searchTeams
error.
Thank you for pointing this out 👍
from mattermost-plugin-custom-attributes.
@mickmister - Sorry for that! I originally thought it was just a fix for that PR but the more I tested the more it just seemed outdated on redux.
I put in a PR / issue for it - #68
I do think the original code for this specific issue can be resubmitted as it does work with subpaths. Not sure what you think the best process for that is.
from mattermost-plugin-custom-attributes.
I do think the original code for this specific issue can be resubmitted as it does work with subpaths. Not sure what you think the best process for that is.
@coltoneshaw It seems fine to have both issues solved in one PR, since one of the fixes is just a dependency update
from mattermost-plugin-custom-attributes.
Related Issues (20)
- Custom Attribute section is not visible HOT 12
- Allow a user to @mention all users with a particular custom attri HOT 1
- Unable to add attribute: users and team names are not recognized HOT 6
- Update customs attributes using a REST API HOT 2
- Blank GroupIDs cause a Go error when parsing the config.
- Increase Mattermost Redux package version
- while editing the Custom attribute the user is able to save it with the Empty/Without data.
- by Inserting only space in the "Attribute Lable" input box the user Should not able to save the setting. because after inserting space its look Weird.
- When there is 2 custom attribute and i delete 1st attribute then i delete the 2nd attribute then i'm not able to delete the 2nd attribute.
- Unable to add Team selection to a custom attribute HOT 3
- users should be able to edit their own attributes once the name exists.
- System Console --> PLUGINS --> Custom User Attributes -->Blank Screen HOT 1
- MM-47046 Use version of React DOM provided by web app HOT 1
- Release 1.3.1 HOT 1
- Notification settings
- [Request] Groups (of the non AD/LDAP variety) should be supported
- [Request] Badges on user icons
- reloading config.json HOT 2
- README says 1.2.0 is the latest version
- Unable to make dist
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 mattermost-plugin-custom-attributes.