? ? ? Pending

User tests: Successful: Unsuccessful:

avatar conseilgouz
conseilgouz
20 Jul 2022

Pull Request for Issue #38310 .

Testing Instructions

Create a Feed display module.
Enter https://www.joomla.org/announcements.feed?type=rss in Feed URL parameter
Enter Sidebar-right as position (using cassiopeia template)

Actual result BEFORE applying this Pull Request

Feed display module shows "Feed not found" error in all cases.

Expected result AFTER applying this Pull Request

Display Feed infos.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar conseilgouz conseilgouz - open - 20 Jul 2022
avatar conseilgouz conseilgouz - change - 20 Jul 2022
Status New Pending
avatar conseilgouz conseilgouz - change - 20 Jul 2022
The description was changed
avatar conseilgouz conseilgouz - edited - 20 Jul 2022
avatar joomla-cms-bot joomla-cms-bot - change - 20 Jul 2022
Category Libraries
avatar conseilgouz conseilgouz - change - 20 Jul 2022
Labels Added: ?
avatar conseilgouz
conseilgouz - comment - 20 Jul 2022

AppVeyor failed because $this->version has correct values for Atom and RSS files.

tests\Unit\Libraries\Cms\Feed\Parser\AtomParserTest.php file and tests\Unit\Libraries\Cms\Feed\Parser\RssParserTest.php seem to be wrong.

avatar richard67
richard67 - comment - 20 Jul 2022

AppVeyor failed because $this->version has correct values for Atom and RSS files.

tests\Unit\Libraries\Cms\Feed\Parser\AtomParserTest.php file and tests\Unit\Libraries\Cms\Feed\Parser\RssParserTest.php seem to be wrong.

@conseilgouz Then you should fix the tests, too. Let us know if you need some help or advise for that.

avatar richard67
richard67 - comment - 20 Jul 2022

P.S.: You can run the unit test locally on a git clone by running composer install (if not done yet) and then ./libraries/vendor/bin/phpunit --testsuite Unit from the Joomla folder.

avatar richard67
richard67 - comment - 20 Jul 2022

@conseilgouz The failing tests can be found here https://github.com/joomla/joomla-cms/blob/4.2-dev/tests/Unit/Libraries/Cms/Feed/Parser/AtomParserTest.php#L374-L387 and here https://github.com/joomla/joomla-cms/blob/4.2-dev/tests/Unit/Libraries/Cms/Feed/Parser/RssParserTest.php#L583-L601 .

But from reading the code, the tests seem to be correct regarding the checked versions.

Here the output from the test run in Appveyor:

There were 2 failures:
1) Joomla\Tests\Unit\Libraries\Cms\Feed\Parser\AtomParserTest::testInitialiseSetsOldVersion
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'0.3'
+'1.0'
C:\projects\joomla-cms\tests\Unit\Libraries\Cms\Feed\Parser\AtomParserTest.php:386
2) Joomla\Tests\Unit\Libraries\Cms\Feed\Parser\RssParserTest::testParseSetsVersion
Failed asserting that null matches expected '2.0'.
C:\projects\joomla-cms\tests\Unit\Libraries\Cms\Feed\Parser\RssParserTest.php:600
FAILURES!
Tests: 757, Assertions: 1190, Failures: 2, Skipped: 1.
Command exited with code 1

So it seems your PR is not right or changes something at the wrong place.

avatar joomla-cms-bot joomla-cms-bot - change - 21 Jul 2022
Category Libraries Libraries Unit Tests
avatar conseilgouz conseilgouz - change - 21 Jul 2022
Labels Added: ?
avatar conseilgouz
conseilgouz - comment - 21 Jul 2022

@richard67 : unit test files (RSS & ATOM) have been updated, so they match FeedFactory behaviour : go to root node and read it.

avatar conseilgouz
conseilgouz - comment - 21 Jul 2022

@richard67 : integration/drone/pr has a phpmin-system-postgress error : I'm afraid I don't have enough knowledge to fix this one....

avatar conseilgouz
conseilgouz - comment - 21 Jul 2022

After merging branch, postgress error disappeared...

avatar richard67
richard67 - comment - 21 Jul 2022

@conseilgouz Sometimes we have unrelated errors in system tests e.g. due to timeouts.

But besides this I am not convinced of your changes in the tests. The tests looked right to me before. I don’t have the time now for testing it myself, but if nobody else can reproduce the issue I have doubts on this PR.

avatar conseilgouz
conseilgouz - comment - 21 Jul 2022

@richard67 : about the changes, when initialise function is called in RssParser.php and AtomParser, stream (xmlreader) has read the root node : it's done in FeedFactory.php, function getFeed(), lines 68 and above.
In the unit test files, I just reproduced this behaviour.
Before my changes, initialise (in AtomParser.php and RssParser.php) was performing a moveToNextElement when reader was already on the feed or rss record (which should contain version info) : that was introduced by PR #38095

avatar conseilgouz
conseilgouz - comment - 21 Jul 2022

but if nobody else can reproduce the issue I have doubts on this PR.

That's a 4.2 RC1 issue. Let's hope somebody else will see this issue.

avatar conseilgouz
conseilgouz - comment - 22 Jul 2022

2 ways to fix #38310

  1. update FeedFactory.php, so it does not read xml file before calling initialise function
    or
  2. update RssParser & AtomParser so they assume actual xlm record is the root node

Current PR is following fix 2 idea.

avatar alikon
alikon - comment - 25 Jul 2022

i can replicate the issue like has been described

avatar conseilgouz
conseilgouz - comment - 6 Aug 2022

i can replicate the issue like has been described

It seems that just the two of us are interested in this issue.

avatar fontanil
fontanil - comment - 8 Aug 2022

I have tested this item successfully on 6157800

Tested with success (4.2.0 rc2 dev)


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

avatar fontanil fontanil - test_item - 8 Aug 2022 - Tested successfully
avatar conseilgouz
conseilgouz - comment - 8 Aug 2022

@alikon : one more human test to go.....

avatar YGomiero
YGomiero - comment - 9 Aug 2022

I have tested this item successfully

Tested with success (4.2.0 rc2 dev)

avatar richard67
richard67 - comment - 9 Aug 2022

I have tested this item successfully

Tested with success (4.2.0 rc2 dev)

@YGomiero A comment with a green check mark is not sufficient for the test to count. You have to mark your test result in the issue tracker here https://issues.joomla.org/tracker/joomla-cms/38312 , use the blue "Test this" button at the top left corner, select the test result and finally submit. Could you do so? Thanks in advance.

avatar YGomiero
YGomiero - comment - 9 Aug 2022

I have tested this item successfully on 6157800


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

avatar YGomiero YGomiero - test_item - 9 Aug 2022 - Tested successfully
avatar richard67 richard67 - change - 9 Aug 2022
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 9 Aug 2022

RTC


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

avatar rdeutz rdeutz - change - 19 Aug 2022
Labels Added: ?
avatar rdeutz rdeutz - change - 19 Aug 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-08-19 12:22:51
Closed_By rdeutz
avatar rdeutz rdeutz - close - 19 Aug 2022
avatar rdeutz rdeutz - merge - 19 Aug 2022

Add a Comment

Login with GitHub to post a comment