User tests: Successful: Unsuccessful:
The aim of this PR is providing possibility to execute custom component's parse preprocess rules instead develop onAfterInitialise plugin.
For testing you should create parsepreprocess method on router of any installed components. The method will be executed on 593 line /libraries/cms/router/router.php
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
I have tested this item successfully on 27802e7
Test OK.
Tested in com_content/router.php
class ContentRouter extends JComponentRouterBase
{
public function parsepreprocess() {
die;
}
Category | ⇒ | Router / SEF |
I have tested this item
Tested in components\com_users\router.php @icampus Pizza, Bugs & Fun
class UsersRouter extends JComponentRouterBase //test
{
public function parsepreprocess() {
echo "Working!";
}
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
Category | Router / SEF | ⇒ | Libraries Router / SEF |
Milestone |
Added: |
@rdeutz it is prepared here: https://github.com/joomla/joomla-cms/compare/staging...zero-24:alexva24?expand=1 you can merge than i open the CS / @since version PR for you to merge.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-08-15 07:45:25 |
Closed_By | ⇒ | rdeutz |
Labels |
Removed:
?
|
I think there is a problem with using "JComponentHelper::getComponents()".
Static method "load" in class "JComponentHelper" get all components even those who discover.
Could someone please correct the Milestone 3.7.0? This PR was merged in Joomla 3.6.3. Thank you!
Milestone |
Added: |
Milestone |
Removed: |
With xmap installed and on Joomla! 3.6.2 works fine, Joomla! 3.6.4 we get
syntax error, unexpected '$items' (T_VARIABLE)
Because this change was pulled in on 3.6.3. Whilst I appreciate it's likely bad outdated coding in xmap. A lot of sites use xmap and we will now be taking them down with this change :-/
Many thanks
Tony
syntax error, unexpected '$items' (T_VARIABLE)
where? is that line?
Sorry! Error reports It was caused at line 123 of
/libraries/cms/router/site.php
I'm just downloading an older backup to try and produce a server to replicate it on since the site was live I just removed xmap completely.
looks like an old or hacked version see: https://github.com/joomla/joomla-cms/blob/3.6.4/libraries/cms/router/site.php#L123
No, that is the same file. I replaced the parse function completely with the version from 3.6.2 to debug it and did an output of the option on the foreach loop. noticing it produced a fatal after com_xamp was loaded with the 3.6.3 site.php router file.
I'll debug further and let you know the outcome.
Please open than a new bug report with all needed information. Commenting on a closed / merged PR get missed fast. ;)
Isn't xmap abandoned now?
Yep, but a normal user wouldn't have a clue or know anything about their xmap version since it's not shown in the updater if it's of a certain version.
The fact the site works fine on 3.6.2 but the 3.6.4 update breaks the site is my point, an incremental version is breaking things regardless of how it should be done. Anyway I'll debug and open a new issue.
Sorry to say this, but this change is pretty horrible. It loads all components, regardless of them even having a frontend part, and then does lots of checks, only to fail for most components and then creating legacy routers for those. And that is why the site of a customer of mine instantiates 57 router objects in the frontend and sites with xmap fail after this "feature". And all of that because one dev didn't want to create a plugin for his special parseing code.
Please open than a new bug report with all needed information. Commenting on a closed / merged PR get missed fast
I know that, but since this has been released, there is nothing that we really can do. This is now out in the open and we have to wait for Joomla 4.0 to fix this. Coincidentally, this did not survive the changes for the 4.0 router.
So, an unsolvable bug for 3.x that has been fixed in 4.0. I just wanted to document that this is a stupid idea in the hopes that future generations stumble upon this and make wiser decisions.
Replaces #8801