dsifford / academic-bloggers-toolkit

WordPress plugin providing an all-in-one solution for effective academic blogging.
https://wordpress.org/plugins/academic-bloggers-toolkit/
GNU General Public License v3.0
120 stars 38 forks source link

All references went to Uncited after update #545

Closed glorious1 closed 5 years ago

glorious1 commented 5 years ago

ABT Version: 5.0.3

PHP Version: 7.2

Theme: GeneratePress

Plugin List: Tried with all plugins deactivated except ABT

Browser: Firefox 65.0.1 and Safari 12.0.3

Expected behavior: After updating ABT to 5.0 and new Wordpress, opening a pre-existing page with references for editing. Expect cited references to show as cited in ABT.

Actual behavior: In all pages I have checked, all references are in the Uncited section of the plugin. However, the citations and the bibliography remain. On the front end, most pages look fine and are functional. However in at least one page on the front end, the popups are no longer popping.

Console messages:

// Paste messages here
Firefox:
JQMIGRATE: Migrate is installed, version 1.4.1 load-scripts.php:9:542
onmozfullscreenchange is deprecated. components.min.js:12:81117
onmozfullscreenerror is deprecated. components.min.js:12:81117

On the front end, for a page for which the citation popups don't pop, I see this console msg.  It doesn't appear on a page for which popups work:
TypeError: e.itemContainer.children.namedItem(...) is null[Learn More] index.ts:124:27 
        citations index.ts:124 
       map (index):286 
        t index.ts:123 
        157 index.ts:184 
Safari:
JQMIGRATE: Migrate is installed, version 1.4.1

all uncited

dsifford commented 5 years ago

This was a bug with the update before the last update which has now been fixed.

glorious1 commented 5 years ago

Sorry, I don’t quite follow. This problem is showing up in 5.0.3, which seems to be latest update. Every page I newly open for editing has all the references in Uncited. Do I need to do something to trigger getting them recognized as cited?

Then there is the probably separate issue on one or a few pages where the popups don’t work, and the associated javascript error. I probably should have submitted it separately.

With just one or two pages, it would be feasible to delete all the references and do them over again to fix the second problem.

On Feb 16, 2019, at 8:19 AM, Derek Sifford notifications@github.com wrote:

This was a bug with the update before the last update which has now been fixed.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dsifford/academic-bloggers-toolkit/issues/545#issuecomment-464359766, or mute the thread https://github.com/notifications/unsubscribe-auth/AFuewSnJgUoJLqdJPuL0W8zilmam_CN0ks5vOC-vgaJpZM4a_C7L.

dsifford commented 5 years ago

Every page I newly open for editing has all the references in Uncited.

That is correct. The last update used a WordPress core API that WordPress broke (and that is still broken) causing citations to not save properly in the post when posts saved.

This update fixes that issue by circumventing the WordPress save API so all new posts will properly save post metadata.

The unfortunate downside is that all posts between around sometime 2(ish) weeks ago and yesterday will have been affected and there's no way to recover those references without adding them all over again.

dsifford commented 5 years ago

It should be known that this is an issue with WordPress core code. Not this plugin. The update I pushed yesterday just circumvents the still existing issue with wordpress core.

glorious1 commented 5 years ago

The unfortunate downside is that all posts between around sometime 2(ish) weeks ago and yesterday will have been affected and there's no way to recover those references without adding them all over again.

Understood, but this is happening with all pages, some of which have not been revised or even opened in over 7 months.

Edit: This was unexpected, but when I did "Convert to Blocks" in the More Options menu at the top left of the edit page (visible only after clicking in the content), my cited references moved into the Cited section of the plugin!

dsifford commented 5 years ago

Ah yes, that's a feature.

Until posts are converted, references cited in the old "classic" editor are not tracked. They're still there though.

glorious1 commented 5 years ago

Whew, that’s a relief. Now I can see a lot of things have changed in the html and css also. Now the popups pop on hover instead of clicking. It makes sense, but I’m gonna miss those cool spinning X’s to close them ;-)

I hope I can ask one css question. In my csl file, I have a property/value: second-field-align="margin" This meant the first field (reference number) is put left of the margin this amount, and subsequent lines are aligned with the margin. I would add a css margin-left to .csl-entry, and the reference number moved left that amount. A screenshot is attached.

I can't get that to work anymore. Is it readily obvious to you how I might reproduce that behavior? screen shot 2019-02-16 at 12 01 05 pm

dsifford commented 5 years ago

Can you show an example of what it looked like before and after?

glorious1 commented 5 years ago

Yes, the above (attached to previous msg) is similar to before - I have not updated that page since the transition, although I've been working on adapting the css so that influences the look. But the hanging indent you see there is the key thing I am trying to achieve in the new system. Attached below is page I have updated. screen shot 2019-02-16 at 12 58 00 pm

Here are the bibliography lines in the csl file: Unfortunately I can't find any way to insert them without the returns being dropped. `

<layout suffix=".">
  <text variable="citation-number" suffix=". " />
  <group delimiter=" ">
    <text macro="author" suffix="." />
    <text macro="year-date" suffix="." />
    <text macro="title" />
    <text macro="container" />
  </group>
</layout>

`

dsifford commented 5 years ago

Do you have existing css that could potentially be modifying how it looks now or is the style exclusively coming from the plugin? If the former, can you try commenting out the custom css styles and show what it looks like at baseline?

glorious1 commented 5 years ago

Yes, I do have some css. Here is how the updated page looks with my css disabled and browser cache cleared:

screen shot 2019-02-16 at 4 15 47 pm

And here is a page that was not updated, without my css.
screen shot 2019-02-16 at 4 19 03 pm

glorious1 commented 5 years ago

I'm getting more confused. Without any of my css, pages I updated yesterday have no outdent, while one I updated this morning does. Yesterday: screen shot 2019-02-17 at 7 02 15 am

and today:

screen shot 2019-02-17 at 7 02 51 am

While a page that has not been updated looks different yet again. Notice the different style, and the numbers are right-justified, keeping the reference text aligned when going from 9 to 10 (unlike previous). It's almost like there appearance depends on the css in effect when the bibliography was created, not when it is displayed? screen shot 2019-02-17 at 7 09 57 am

dsifford commented 5 years ago

Difficult for me to really understand fully without having a link to a page to see, but one thing I will say is that the old bibliography and new bibliography have slightly different html formatting, the newer being better for accessibility and screen readers.

So that is likely the cause for disparity between the old and new posts.