Filters not working anymore: returns unfiltered results

Hello, since this morning, the search feature in all my models is not working anymore.

Observed behavior

After clicking on “apply filter”, forest return the sale basic page without filtering it.
No error is logged unfortunately.

What is more weird is that it is working perfectly in my Staging environment.

the request: https://mylumberforest.herokuapp.com/forest/Series?timezone=Europe/Paris&fields[Series]=_id,_p_infoFr,titles,publicationDate,expirationDate,isChild,chronological,format,status,classification,emotion,genre,age,year,dialogue,focus,production,scripted,categories,totalEpisodes,_p_infoEn,episodePrice,_p_infoEs,totalPrice,totalLength,ownerId,similars,productor,podcastOwner,serialized,seasonsForce,reco_boost,ogc,remuneration,subsidized&fields[ownerId]=email&filters={“field”:“status”,“operator”:“equal”,“value”:1}&page[number]=1&page[size]=20&sort=-_updated_at

Failure Logs

No failure logs are reported…

Context

  • Project name: Sybel

  • Team name: Operation

  • Environment name: Production

  • Agent type & version:
    “forest-express-mongoose”: “^6.7.2”,

  • Recent changes made on your end if any:

    • Update v5 > v6
    • Add 2 new models
    • Update User Agent for the new deployment workflow

Project Name: Sybel
Environnement: Production

Packages:

  • Liana (Mongoose): 6.7.2
  • host in Heroku
  • Agent type: Latest

Hello @GuillaumeP :wave:

Welcome to the community.

You mention search and filters in your message. Do you experience this issue when using the search bar or when using the filters or both ?

Do you get the same results as without search / filters or do you get no results at all ?

Do you experience this issue only on the collection lists or also on the related data lists ?

Can you share screenshots from Chrome Developer Tools > Network > [the request sent right after search / filter to fetch the new data] > Payload and Preview, from both your working staging environment and your not working production environment ?

Thank you :pray:

Hi Nicolas,

Thank you for your feedback, the frontend rollback worked well !

Regards

Hello @GuillaumeP

We couldn’t reproduce the issue you’re experiencing on our end so we redeployed the latest version of our frontend. Please let me know if you experience this issue again :pray:

1 Like

Hi Nicolas, I still get the same error with the same search feature in the same model.

  • Do you experience this issue when using the search bar or when using the filters or both ?
    No, only the apply filter

  • Do you get the same results as without search / filters or do you get no results at all ?
    Yes i get the same result, like the query didn’t take the parameters

  • Do you experience this issue only on the collection lists or also on the related data lists ?
    No it is the same model this time

  • Can you share screenshots from Chrome Developer Tools > Network > [the request sent right after search / filter to fetch the new data] > Payload and Preview, from both your working staging environment and your not working production environment ?

Production:
https://myForest/forest/Series?timezone=Europe/Paris&fields[Series]=_id,_p_infoFr,titles,publicationDate,expirationDate,isChild,chronological,format,status,classification,emotion,genre,age,year,dialogue,focus,production,scripted,categories,totalEpisodes,_p_infoEn,episodePrice,_p_infoEs,totalPrice,totalLength,ownerId,similars,productor,podcastOwner,serialized,seasonsForce,reco_boost,ogc,remuneration,subsidized&fields[ownerId]=email&filters={"field":"status","operator":"equal","value":2}&page[number]=1&page[size]=20&sort=-_updated_at

https://app.forestadmin.com/Sybel/Production/Content/data/1814516/index?filter=%7B%22type%22%3A%22and%22%2C%22conditions%22%3A%5B%7B%22operator%22%3A%22is%22%2C%22value%22%3A2%2C%22fieldName%22%3A%22status%22%2C%22subFieldName%22%3Anull%2C%22embeddedFieldName%22%3Anull%7D%5D%7D

Payload:

Preview:

As you can see, the “status” in the preview data does not match the on in the query

Staging

Payload:

Preview:

After multiple search filter execution by our team, this issue occurred also on some other models

I’m not able to reproduce so far. I will ask someone else to have a look.

Could you share the model definitions of one or more models that were impacted so we can see if there is anything specific about them ?

Thanks :pray:

Sure:

const mongoose = require('mongoose');

const schema = mongoose.Schema(
  {
    _created_at: Date,
    _id: String,
    _p_infoFr: String,
    _p_infoEs: String,
    _p_infoEn: String,
    _updated_at: Date,
    actors: String,
    authors: String,
    podcastOwner: String,
    ownerId: { type: String, ref: '_User' },
    beneficiaries: String,
    classification: String,
    compositor: String,
    expirationDate: Date,
    isChild: Boolean,
    isChildHeader: Boolean,
    isHeader: Boolean,
    isUnit: Boolean,
    seasonsForce: { type: Boolean, default: false },
    productor: String,
    publicationDate: Date,
    realisator: String,
    similars: String,
    status: Number,
    year: String,
    chronological: Boolean,
    serialized: { type: Boolean, default: false },
    format: [String],
    genre: [String],
    age: [String],
    scripted: [String],
    dialogue: [String],
    focus: [String],
    time: [String],
    emotion: [String],
    production: [String],
    episodePrice: Number,
    reco_boost: Number,
    ogc: Boolean,
    subsidized: { type: Boolean, default: false },
    remuneration: String,
  },
  {
    timestamps: { createdAt: '_created_at', updatedAt: '_updated_at' },
    versionKey: false,
  },
);

module.exports = mongoose.model('Series', schema, 'Series');

Thank you.

It appears your staging server is indeed using forest-express-mongoose 6.7.2 but your production server is using 3.2.5.

Can you upgrade your production server to 6.7.2 ?

Hello Nicolas,

Okay I understand multiple things here.

There was an issue between heroku and github, connector connection was compromised
So all previous deployment to master was unsuccessful.

We successfully deployed our 6.7.2 update to production with another method:

image

The issue seems to be resolved.
We will give you a final feed back later.

Thank you again for your help Nicolas.