View Issue Details

IDProjectCategoryView StatusLast Update
0005777Simple:Pressjavascriptpublic2017-09-16 19:43
ReporterYellow SwordfishAssigned ToMr Papa 
PrioritynormalSeverityN/AReproducibilityhave not tried
Status closedResolutionfixed 
Product Version5.8 
Target Version5.8Fixed in Version5.8 
Summary0005777: Auto-Update problem
DescriptionGetting this error in the console (the only active auto-update component is admin bar)

Uncaught ReferenceError: s is not defined
    at eval (eval at spj.performUpdates (sp-forum-dev.js:272), <anonymous>:1:1)
    at Object.spj.performUpdates (sp-forum-dev.js:272)
    at <anonymous>:1:5
TagsNo tags attached.
change_log_textupdate meta api to have single and multi get class members
typedefect

Activities

Mr Papa

Mr Papa

2017-03-15 04:14

administrator   ~0019318

Afraid I cannot replicate this... All the auto updates are working just fine for me...
Yellow Swordfish

Yellow Swordfish

2017-03-20 09:50

administrator   ~0019333

Last edited: 2017-03-20 09:51

View 2 revisions

Did you wait long enough? And remember - I only have the admin bar active currently and this is not theme dependent.

If you put a simple alert call to show the value of the func variable then it resolves to:

s('http://simple-press.dev/wp-admin/admin-ajax.php?action=p')

whereas in 5.7.4 it resolves correctly to:

spabupdate('http://simple-press.574/wp-admin/admin-ajax.php?action=admin-bar-update&target=newposts')

And the former, of course, errors as described.

I am aware this might be down to something I have done with the admin bar but I do not understand how you can not be seeing the same error.

Mr Papa

Mr Papa

2017-03-20 14:06

administrator   ~0019334

why would it be theme dependent??

yes, I left it for over an hour once to continually update.. no issues... in fact, it correctly found and updated the admin bar counts if I made posts from another user in a different browser... same for pm, subscribe and watch... I have not stripped down to just admin bar though...

check the value of the sfmeta... there was an upgrade to core and admin bar plugin to put it in new format... yours looks perhaps out of date??
Yellow Swordfish

Yellow Swordfish

2017-03-20 14:21

administrator   ~0019335

No - there is no problem with my sfmeta entry
Mr Papa

Mr Papa

2017-03-21 03:39

administrator   ~0019336

so your meta has the namespace js in it?

are you using js cache or not? and what about sp debug scripts?

working fine for me... doesnt evaluate to the expression you posted (not sure how it would since that is not a string we use)..
Yellow Swordfish

Yellow Swordfish

2017-03-21 09:23

administrator   ~0019338

meta - yes:
a:2:{i:0;s:18:"spj.adminBarUpdate";i:1;s:36:"admin-bar-update&target=newposts";}

js cache:
never during development

sp debug scripts:
??
Mr Papa

Mr Papa

2017-03-22 03:38

administrator   ~0019340

the sp scripts debug flag says to use minimized or full size js file...
Yellow Swordfish

Yellow Swordfish

2017-03-22 09:32

administrator   ~0019341

Ah is that all you meant. I use debug mode all the timer when developing.
Mr Papa

Mr Papa

2017-04-23 16:19

administrator   ~0019442

so spent another couple hours this morning and still cannot get this to fail or have a clue what might be wrong with yours...

is it only the admin bar that fails or all? have you tried any others? for me, I have pm, subs, watches, admin bar (runs 3) working every time...

out of curiosity, have you tried uninstalling and then reactivating admin bar?
Yellow Swordfish

Yellow Swordfish

2017-08-25 09:15

administrator   ~0019603

The attached image shows what I get now. Again - ONLY the admin bar plugin active. I get no errors showing up with all active,.

Mr Papa

Mr Papa

2017-09-11 03:20

administrator   ~0019633

think I am finally able to understand and see what you are seeing... problem is no clue how to fix it at this point...

believe it to be an issue with the new meta class... and could be more widespread...

META=>get_value() returns an indexed array unless there is just one item... then it returns a simple array... certainly a reason for this, but dont know off hand... might be simply doing a single function to handle multiple ways of 'getting'...

can certainly 'fix' this multiple ways... handle simple array on receive end of auto update... or add special case to the function for single element but indexed array... both straight forward...

but why is the class member doing change to simple array from indexed array for single entry? is it more widespread? I would think it was possible to get single entry in lots of cases... and why or where does it expect it to be reduced to simple array????

suspect answer will be to clean up the class member... but have to look at all uses of META->get_value() and understand them all...
svn

svn

2017-09-14 04:22

administrator   ~0019635

Changeset [15551] by steve on 2017-09-14 00:22:52 -0400 (Thu, 14 Sep 2017)

test issue 0005777 update meta api to have single and multi get class members

 Changed Files:

U trunk/sp-api/sp-api-class-spcmeta.php
U trunk/sp-api/sp-api-class-spcpost.php
U trunk/sp-api/sp-api-class-spcuser.php
U trunk/sp-startup/forum/sp-forum-framework.php

 Differences:

 http://websvn.simple-press.com/revision.php?repname=Simple:Press&path=%2F&rev=15551
svn

svn

2017-09-14 04:23

administrator   ~0019636

Changeset [15552] by steve on 2017-09-14 00:23:14 -0400 (Thu, 14 Sep 2017)

test issue 0005777 update meta api to have single and multi get class members

 Changed Files:

U plugins/identities/library/sp-identities-components.php
U plugins/rank-info/library/sp-rank-info-components.php

 Differences:

 http://websvn.simple-press.com/revision.php?repname=Simple:Press&path=%2F&rev=15552

Issue History

Date Modified Username Field Change
2017-03-14 09:42 Yellow Swordfish New Issue
2017-03-15 04:14 Mr Papa Note Added: 0019318
2017-03-20 09:50 Yellow Swordfish Note Added: 0019333
2017-03-20 09:51 Yellow Swordfish Note Edited: 0019333 View Revisions
2017-03-20 14:06 Mr Papa Note Added: 0019334
2017-03-20 14:21 Yellow Swordfish Note Added: 0019335
2017-03-21 03:39 Mr Papa Note Added: 0019336
2017-03-21 09:23 Yellow Swordfish Note Added: 0019338
2017-03-22 03:38 Mr Papa Note Added: 0019340
2017-03-22 09:32 Yellow Swordfish Note Added: 0019341
2017-04-23 16:19 Mr Papa Note Added: 0019442
2017-07-11 01:57 Mr Papa Product Version 6.0 => 5.8
2017-07-11 01:58 Mr Papa Target Version 6.0 => 5.8
2017-08-25 09:15 Yellow Swordfish File Added: Screen Shot 2017-08-25 at 10.10.48 am.png
2017-08-25 09:15 Yellow Swordfish Note Added: 0019603
2017-09-11 03:20 Mr Papa Note Added: 0019633
2017-09-13 02:17 Mr Papa Assigned To => Mr Papa
2017-09-13 02:17 Mr Papa Status new => assigned
2017-09-13 02:17 Mr Papa change_log_text => update
2017-09-14 04:22 svn =>
2017-09-14 04:22 svn Note Added: 0019635
2017-09-14 04:22 svn Status assigned => testing
2017-09-14 04:23 svn =>
2017-09-14 04:23 svn Note Added: 0019636
2017-09-16 19:43 Mr Papa Status testing => closed
2017-09-16 19:43 Mr Papa Resolution open => fixed
2017-09-16 19:43 Mr Papa Fixed in Version => 5.8
2017-09-16 19:43 Mr Papa change_log_text update => update meta api to have single and multi get class members