PECE-project / drupal-pece

PECE development repository
GNU General Public License v3.0
20 stars 28 forks source link

Fix links to filtered search in "Building" blocks on front page (and Dashboard) #507

Open mlncn opened 3 weeks ago

mlncn commented 3 weeks ago

If i edit the "Link wth Text" (typo in original) for the "See all Artifacts" link in the "Building Content" content block of type Layout block, it looks like this:

/search?search_api_fulltext=&f%5B0%5D=content_type%3Aartifact_tabular_data&f%5B1%5D=content_type%3Aartifact_video&f%5B2%5D=content_type%3Apece_artifact_audio&f%5B3%5D=content_type%3Apece_artifact_bundle&f%5B4%5D=content_type%3Apece_artifact_fieldnote&f%5B5%5D=content_type%3Apece_artifact_image&f%5B6%5D=content_type%3Apece_artifact_pdf&f%5B7%5D=content_type%3Apece_artifact_text&f%5B8%5D=content_type%3Apece_artifact_website

It should look like this:

/search?type[0]=pece_artifact_image&type[1]=pece_artifact_website&type[2]=pece_artifact_pdf&type[3]=pece_artifact_text&type[4]=artifact_video&type[5]=pece_artifact_audio&type[6]=pece_artifact_bundle&type[7]=pece_artifact_fieldnote&type[8]=artifact_tabular_data

(The search_api_fulltext part is not the problem; the apparent double-escaping… hmm, maybe that is not the issue, maybe it is that the view changed. Because this would work too:

/search?type%5B0%5D=pece_artifact_image&type%5B1%5D=pece_artifact_website&type%5B2%5D=pece_artifact_pdf&type%5B3%5D=pece_artifact_text&type%5B4%5D=artifact_video&type%5B5%5D=pece_artifact_audio&type%5B6%5D=pece_artifact_bundle&type%5B7%5D=pece_artifact_fieldnote&type%5B8%5D=artifact_tabular_data)

Anyway, fixing now and here are the currently correct values in case there is more regression related to import/export or something else:

/search?type[0]=pece_annotation

/search?type[0]=pece_memo

/search?type[0]=pece_essay&type[1]=pece_photo_essay&type[2]=pece_timeline_essay

mlncn commented 3 weeks ago

And for Building Projects:

/search?type[0]=pece_project
/search?type[0]=pece_substantive_logic&type[1]=pece_design_logic
/search?vid[0]=groups
/search?type[0]=pece_analytic

Fixed on demo these need to be exported out now:

mlncn commented 3 weeks ago

These blocks are exported now:

https://demo-pece.drutopia.org/admin/content/block/3 https://demo-pece.drutopia.org/admin/content/block/4

@MegaKeegMan over to you to make sure the links in Building Content and Building Projects (on front page and in dashboard, the same) work after content import. Thanks!

mlncn commented 3 weeks ago

And now we've caught the anonymous visitor blocks too (same links, but different text).