getting error $ref '/properties/attributes/class'

Aurelie C 5 Reputation points
2024-08-07T22:24:18.0533333+00:00

getting error $ref '/properties/attributes/class' for this and don't know how to fix it. The timeline never moves whether it's Pending, approved or rejected. The color never changes.

User's image

User's image

Microsoft 365 and Office | SharePoint | Development
{count} vote

2 answers

Sort by: Most helpful
  1. Ling Zhou_MSFT 23,620 Reputation points Microsoft External Staff
    2024-08-08T02:19:02.64+00:00

    Hi @Aurelie C,

    Thank you for posting in this community.

    Here are a few things you can try to resolve this issue:

    1.Schema Reference: Ensure that your JSON schema reference is correct. The latest schema URL should be:

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json"
    }
    

    2**.Validation Error**: The Monaco Editor used in SharePoint’s formatting tab sometimes throws validation errors that don’t actually prevent your formatting from working. You can often ignore these errors if your formatting appears to be working correctly.

    3.Syntax Check: Double-check your JSON syntax. You can put your JSON code into some JSON code editor, and it will automatically find syntax issues with your JSON code.

    4.Excel-style expressions are not supported on SP 2019. You need to use the AST(Abstract Syntax Tree) version of the JSON from the sample repository on SP 2019.

    You can find more examples of SharePoint 2019 in this link below.

    https://github.com/SharePoint/sp-dev-list-formatting/tree/master/column-samples

    5.If the problem persists, please tell me the type of your column, the full JSON code, and the styling effect you want to achieve.

    This will help me analyze and solve your problem better.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Ling Zhou_MSFT 23,620 Reputation points Microsoft External Staff
    2024-08-09T05:23:14.2533333+00:00

    Hi @Aurelie C,

    Thank you for your reply.

    I tested the JSON code you shared with me, and everything worked perfectly.

    User's image

    This seems to have been a fortuitous event.

    I suggest that you:

    1.Whether all SharePoint lists have the same problem? You could create a new SharePoint list to check.

    2.Check if the same issue occurs with other SharePoint sites.

    3.Try to use a different browser or your browser's InPrivate mode to see if the same error occurs.

    4.Are other users facing the same problem? View through another computer or account.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.