1 egbmn Nov 14, 2011 23:46
3 lefataliste Mar 02, 2012 12:31
sam2kb wrote:
It might be related to jQuery or your particular browser. Anyway, jQuery was updated in v5 and hopefully the bug is fixed.
I can't reproduce it in test system.
Thanks for the answer.
I have this with b2evo v 4.1.2
The previous error message was with MSIE8 / win XP32. With Mozilla Firefox v3.6x or v10 / win XP 32, i have the following error in the console :
"Erreur : uncaught exception: Syntax error, unrecognized expression: [name=actionArray[update_publish]]"
Should i look for this new jquery version ? If so, where should i put it ?
regards
Jacques
4 sam2kb Mar 02, 2012 17:20
Replace /rsc/js/jquery.js and /rsc/js/jquery.min.js with new files from here. Just make sure you remove version number from filename.
http://code.jquery.com/jquery-1.7.1.min.js
http://code.jquery.com/jquery-1.7.1.js
5 lefataliste Mar 02, 2012 19:07
sam2kb wrote:
Replace /rsc/js/jquery.js and /rsc/js/jquery.min.js with new files from here. Just make sure you remove version number from filename.
http://code.jquery.com/jquery-1.7.1.min.js
http://code.jquery.com/jquery-1.7.1.js
Ok, I tried, but no change...
I possibly localized the error there (in admin.php when editing a post, at the end of the file) :
<script type="text/javascript">
jQuery( '#itemform_visibility input[type=radio]' ).click( function()
{
var publishnow_btn = jQuery( '.edit_actions input[name=actionArray[update_publish]]' );
if( this.value != 'draft' )
{ // Hide the "Publish NOW !" button:
publishnow_btn.css( 'display', 'none' );
}
else
{ // Show the button:
publishnow_btn.css( 'display', 'inline' );
}
} );
</script>
I hope you can find it ?
regards
Jacques
6 sam2kb Mar 02, 2012 19:23
The code looks ok. I don't get errors in my IE9 or FF10 on windows 7. I will check other browsers and OS.
7 lefataliste Mar 03, 2012 20:41
sam2kb wrote:
The code looks ok. I don't get errors in my IE9 or FF10 on windows 7. I will check other browsers and OS.
The code portion over there is apparently a call to some part of jquery.
I checked in Win 7 with MSIE 9 or FF and I DO have the same error. Of course to receive notification of the error, in IE you need to validate the options in tools/options/advanced. In FF there are in the error console. Could it be that something could differ according to the localisation for this question ? My IE or FF are in french.
8 lefataliste Mar 07, 2012 18:47
Hello,
sorry to bring back this topic here, but it has abusively been moved to "fixed". It is not !
The fact : in 4.1.2 and 4.1.3 when one wants to changed the status of a post from, say, private to published, then an error is raised by js and the action of unhiding the "publish" button is not done. However, when
recording the post, everything is Ok.
We already discussed here about my version of browser, of system and of jquery, without result. I just noticed that another blog running v 4.0.5 of b2evol has not this problem. So, since it is exactly with the same environment my conclusion is that the error is somewhere within the changes since 4.0.5, not in any part of my environment ?
Of course, since the post is anyhow recorded, one can live with this error, but I do ot like this. With MSIE this kind of js error is not shown by default, one has to go to the tools/advanced settings to see them. In FF they are in the error console.
Here is the code where the problem lies.
<script type="text/javascript">
jQuery( '#itemform_visibility input[type=radio]' ).click( function()
{
var publishnow_btn = jQuery( '.edit_actions input[name=actionArray[update_publish]]' );
if( this.value != 'draft' )
{ // Hide the "Publish NOW !" button:
publishnow_btn.css( 'display', 'none' );
}
else
{ // Show the button:
publishnow_btn.css( 'display', 'inline' );
}
} );
</script>
regards,
Jacques
9 sam2kb Mar 28, 2012 04:23
I finally found where the bug was. We need to enclose actionArray[update_publish] in double quotes.
var publishnow_btn = jQuery( '.edit_actions input[name="actionArray[<?php echo $next_action; ?>_publish]"]' );
Thank you for your patience :)
Fixed in 4.1.4
10 lefataliste Mar 28, 2012 14:00
sam2kb wrote:
I finally found where the bug was. We need to enclose actionArray[update_publish] in double quotes.
var publishnow_btn = jQuery( '.edit_actions input[name="actionArray[<?php echo $next_action; ?>_publish]"]' );
Thank you for your patience :)
Fixed in 4.1.4
Ok. Great ! Can you please tell me where to localize the file to be edited ?
Thanks for your good job :)
Best regards.
--
Jacques
11 sam2kb Mar 28, 2012 20:43
The code is in /inc/items/model/_item.funcs.php search for
input[name=actionArray
there are 2 appearances, you should edit both.
12 lefataliste Mar 28, 2012 21:09
sam2kb wrote:
The code is in /inc/items/model/_item.funcs.php search for
input[name=actionArray
there are 2 appearances, you should edit both.
Ok, I confirm. This solves the problem. Thanks a lot.
best regards.
Jacques
It might be related to jQuery or your particular browser. Anyway, jQuery was updated in v5 and hopefully the bug is fixed.
I can't reproduce it in test system.