No Code Attached Yet
avatar rgtr
rgtr
9 Sep 2021

Hi
I have two extensions. Both work perfectly in the front end, but in the back end in the form I am getting an error when using PHP 8.0.6. The following is repeated 4 times.

Warning: SimpleXMLElement::xpath(): Invalid predicate in C:\xj_sites\2_dv\libraries\src\Form\Form.php on line 1366

Richard

Steps to reproduce the issue

Install TDOC Facebook module - http://www.tdocplus.co.uk/tdoc_j4_dev/tdoc_fbk/mod_tdoc_fbk.zip

Expected result

Form no messages

Actual result

Error messages plus form which shows fine. See screen shot.

System information (as much as possible)

PHP by apache 3.3.0 compiled 6th April 2021 running under Windows 7 Sp 1
Noted: that the system info page seems to have got lost in J4 !screen shot 2021-09-09 at 18 00 47

Additional comments

Works fine in PHP 7.4.16 on fast hosting direct.

XML code as follows:

<config>
	<fields name="params" addpath="/modules/mod_tdoc_fbk/elements">
		<fieldset name="basic">  
		  <!-- hidden fields -->
		  <field name="apikey" type="hidden" default="192044219335632" label="Facebook API Key" description="Facebook API Key" /> 
		  <!-- url field -->
		  <field type="spacer" name="&lt;div style=&quot;color:#fff; font-size:12px; font-weight:bold; padding:3px; margin:0; text-align:center; background:#333333;&quot;&gt;Settings&lt;/div&gt;" />
		  <field name="facebook_url" type="text" default=""    label="Base URL"   description="Enter Base URL" size="50" />
		  <!-- configuration fields -->
		  <field name="stream"       type="list" default="yes" label="Show Posts" description="Show Posts">
		    <option value="true">Yes</option>
				<option value="false">No</option>
		  </field>
		  <field name="show_faces" type="list" default="false" label="Show faces" description="Show faces of fans">
				<option value="true">Show</option>
				<option value="false">Hide</option>
		  </field>
		  <field name="hide" type="list" default="false" label="Hide Cover Photo" description="Hide Cover Photo">
				<option value="true">Yes</option>
				<option value="false">No</option>
		  </field>
		  <field name="small_header" type="list" default="true" label="Small Header" description="Small Header">
				<option value="true">Yes</option>
				<option value="false">No</option>
		  </field>
		  <field name="connections" type="text" default="25" label="Number of Connections" description="Total number of connections" />
		  <!-- dimension fields -->
		  <field type="spacer" name="&lt;div style=&quot;color:#fff; font-size:12px; font-weight:bold; padding:3px; margin:0; text-align:center; background:#333333;&quot;&gt;Dimensions&lt;/div&gt;" />
		  <field name="width"  type="text" default="300" label="Width"  description="" />
		  <field name="height" type="text" default="700" label="Height" description="" />
    </fieldset>
</fields>
avatar rgtr rgtr - open - 9 Sep 2021
avatar rgtr rgtr - change - 9 Sep 2021
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 9 Sep 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 9 Sep 2021
avatar brianteeman
brianteeman - comment - 9 Sep 2021

Noted: that the system info page seems to have got lost in J4 !

image

avatar PhilETaylor
PhilETaylor - comment - 9 Sep 2021
  1. Your XML is invalid as there is no closing </config> - but Im going to assume thats where you copied and pasted to GitHub

  2. Line 1366 relates to the name of a field, and a quick glance at your XML I see you have a spacer with a name of

&lt;div style=&quot;color:#fff; font-size:12px; font-weight:bold; padding:3px; margin:0; text-align:center; background:#333333;&quot;&gt;Dimensions&lt;/div&gt;

Its a hunch, but try replacing that with just Dimensions and see if the error goes away.

avatar PhilETaylor
PhilETaylor - comment - 9 Sep 2021

I cannot replicate this issue (although I have PHP 8.0.10 installed - the latest and only secure version in 8.0.x series)

Screenshot 2021-09-09 at 21 48 04

avatar rgtr
rgtr - comment - 10 Sep 2021

Phil.
First of I am absolutely delighted that my extension works in 8.0.1.
Next is thanks for the location of the information. Here it is:

Setting Value
Windows NT HP-DEVELOP 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) AMD64
mysql
10.4.19-MariaDB
utf8mb4_general_ci
utf8mb4_general_ci
None
No
8.0.6
Apache/2.4.47 (Win64) OpenSSL/1.1.1k PHP/8.0.6
apache2handler
Joomla! 4.0.2 Stable [ Furaha ] 24-August-2021 19:54 GMT
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36

Will do some testing and see what happens.
a) changed as you suggested - and now I have a just the word "Settings", but of course not highlighted
b) I got the code from a Joomla web site on structure of xml files. But I normally make a note of these things - NOT in this case ! See here: http://tdocplus.co.uk/0a_Empty400/face-book/facebook-display-instructions-and-code

Will install apache 3.3.0 on my laptop and see what that says - it may be a win7 problem

Richard

avatar rgtr
rgtr - comment - 11 Sep 2021

Hi
Installed php 8.0.6 on windows 8 lap top. Problem persists
Then installed php 8.0.10 . Problem persists
Guess then this is now a bug in Joomla 4
Phil - how is your error reporting - I am set to Max. Cannot actually change it as I get an Invalid Field error .
Richard

avatar PhilETaylor
PhilETaylor - comment - 11 Sep 2021

I write code for a living. My whole stack is set to always display error error, warning and notice.

To be totally sure I added

error_reporting(E_ALL);
ini_set('display_errors',1);

Just before the line in the warning in your screenshot and still no warnings were shown.

Im on a mac, we need someone here to test on windows, I dont have access to windows. I think @brianteeman still uses windows, maybe he can test and replicate?

When I dump out the paths they look ok to me

Screenshot 2021-09-11 at 12 50 26

avatar rgtr
rgtr - comment - 11 Sep 2021

Hi

I think the two errors may well be the < and > around the format.

I used to write a lot of code in Clipper, and the CA_VisualObjects. see wp.tdocplus.co.uk. But that was many years ago. It ended up a nice stable product, and people still download and use.

But PHP has never been high on my list, tho I did write some scripts for server side processing of transmittals notes and rfi/tq's etc. No css so it was not exactly pretty... the heart attacks ... 74 and well retired

But I FEEL it's a bug. Maybe an MS interpretor somewhere ...

Richard

avatar brianteeman
brianteeman - comment - 11 Sep 2021

I cannot replicate this issue

Setting Value
Windows NT DESKTOP-5A2A1UB 10.0 build 19043 (Windows 10) AMD64
mysql
8.0.19
utf8_general_ci
utf8mb4_0900_ai_ci
None
Yes
8.0.10
Apache/2.4.41 (Win64) mod_fcgid/2.3.10-dev
cgi-fcgi
Joomla! 4.0.3-dev Development [ Furaha ] 24-August-2021 22:15 GMT
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36
avatar rgtr
rgtr - comment - 11 Sep 2021

Brian
I am delighted !
It might mean that I have dodgy code repositories as it happens on all four of my web sites in J4 in W7.
Richard

avatar jwaisner jwaisner - change - 24 Sep 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-09-24 03:53:49
Closed_By jwaisner
avatar joomla-cms-bot joomla-cms-bot - change - 24 Sep 2021
Closed_Date 2021-09-24 03:53:49 2021-09-24 03:53:50
Closed_By jwaisner joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 24 Sep 2021
avatar joomla-cms-bot
joomla-cms-bot - comment - 24 Sep 2021

Set to "closed" on behalf of @jwaisner by The JTracker Application at issues.joomla.org/joomla-cms/35522

avatar jwaisner
jwaisner - comment - 24 Sep 2021

Thank you for the report. As this cannot be reproduced, I am closing this.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35522.

avatar jwaisner
jwaisner - comment - 24 Sep 2021

Thank you for the report. As this cannot be reproduced, I am closing this.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35522.

Add a Comment

Login with GitHub to post a comment